Skip to content

Commit 86c07ff

Browse files
committed
🐛 Handle 404 for site not found
Closes #2
1 parent 713a8fa commit 86c07ff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Client.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@ public function getTrackingSnippet(string $domain): CallResult
191191
);
192192
}
193193

194+
if ($response->getStatusCode() === 404) {
195+
return new CallResult(
196+
false,
197+
false,
198+
$this->getRemainingRequests($response),
199+
$this->getMaxRequests($response),
200+
$json['message'] ? [$json['message']] : [],
201+
null
202+
);
203+
}
204+
194205
return new CallResult(
195206
false,
196207
false,

0 commit comments

Comments
 (0)