Skip to content

Commit 304f653

Browse files
committed
Also add sta handling for request.
1 parent fa6b7c7 commit 304f653

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Request/Request.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,15 @@ public function request($path, array $options = []): RequestOperationResult
451451
}
452452

453453
if ($response->getStatusCode() == 409 && $body == self::EVCS_SITE_RESPONSE) {
454-
// This request is expected to fail for an eVCS site, throw exception that will be catched down the road.
454+
// This request is expected to fail for an eVCS site, throw exception.
455455
throw new TerminusEvcsSiteException(self::EVCS_SITE_EXCEPTION_MESSAGE);
456456
}
457457

458+
if ($response->getStatusCode() == 409 && $body == self::STA_SITE_RESPONSE) {
459+
// This request is expected to fail for an STA site, throw exception.
460+
throw new TerminusEvcsSiteException(self::STA_SITE_EXCEPTION_MESSAGE);
461+
}
462+
458463
return new RequestOperationResult([
459464
'data' => $decoded_body ?? $body,
460465
'headers' => $headers,

0 commit comments

Comments
 (0)