diff --git a/src/Entities/DataAbstract.php b/src/Entities/DataAbstract.php index 351e537..be12591 100644 --- a/src/Entities/DataAbstract.php +++ b/src/Entities/DataAbstract.php @@ -61,7 +61,7 @@ public static function createFromTypeAndString(DNSRecordType $recordType, string (int)$parsed[0] ?? 0, (int) $parsed[1] ?? 0, (int) $parsed[2] ?? 0, - new Hostname($parsed[3]), + new Hostname($parsed[3]) ); } diff --git a/src/Resolvers/CloudFlare.php b/src/Resolvers/CloudFlare.php index 2220319..98c311b 100644 --- a/src/Resolvers/CloudFlare.php +++ b/src/Resolvers/CloudFlare.php @@ -50,7 +50,7 @@ protected function doQuery(Hostname $hostname, DNSRecordType $type): DNSRecordCo return (!$type->isA(DNSRecordType::TYPE_ANY)) ? $this->doApiQuery($hostname, $type) : $this->doAnyApiQuery($hostname); - } catch (RequestException $e) { + } catch (\Throwable $e) { throw new QueryFailure("Unable to query CloudFlare API", 0, $e); } } @@ -69,7 +69,7 @@ private function doAnyApiQuery(Hostname $hostname): DNSRecordCollection $this->parseResult((array) json_decode((string)$response->getBody(), true)) ); }, - 'rejected' => function (RequestException $e): void { + 'rejected' => function (\Throwable $e): void { throw $e; }, ]);