Skip to content

Commit 953c695

Browse files
committed
Fix API Client Exception types
1 parent cd1adcd commit 953c695

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/lib/Aplazame/Sdk/Api/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ public function request( $method, $path, array $data = null ) {
159159
}
160160

161161
if ( $response->getStatusCode() >= 500 ) {
162-
throw Aplazame_Sdk_Api_ApiClientException::fromResponse( $response );
162+
throw Aplazame_Sdk_Api_ApiServerException::fromResponse( $response );
163163
}
164164

165165
if ( $response->getStatusCode() >= 400 ) {
166-
throw Aplazame_Sdk_Api_ApiServerException::fromResponse( $response );
166+
throw Aplazame_Sdk_Api_ApiClientException::fromResponse( $response );
167167
}
168168

169169
$payload = $this->decodeResponseBody( (string) $response->getBody() );

0 commit comments

Comments
 (0)