You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Welcome to the Stackla PHP SDK GitHub repository!
3
3
4
4
This SDK is intended for PHP developers to enable them to integrate Stackla RESTful APIs into their applications with greater ease. You can find more information on working with Stackla APIs on the [Stackla Developer Portal](http://developer.stackla.com/).
5
5
6
-
We are continously working on improving both the SDK and the documentation around it, so please feel free to give us feedback and any reports of issues to [[email protected]](mailto:[email protected]).
6
+
We are continuously working on improving both the SDK and the documentation around it, so please feel free to give us feedback and any reports of issues to [[email protected]](mailto:[email protected]).
thrownew \Exception(sprintf("Server return %s error code. Bad request: The request could not be understood. %s", $this->response->getStatusCode(), $this->response->getBody(true)));
251
-
returnfalse;
252
-
break;
251
+
throw ApiException::create(
252
+
sprintf("Server return %s error code. Bad request: The request could not be understood. %s", $this->response->getStatusCode(), $this->response->getBody(true)),
253
+
$statusCode,
254
+
$this->response->getBody(true)
255
+
);
253
256
case401:
254
-
thrownew \Exception(sprintf("Server return %s error code. Unauthorized: Authentication credentials invalid or not authorised to access resource", $this->response->getStatusCode()));
255
-
returnfalse;
256
-
break;
257
+
throw ApiException::create(
258
+
sprintf("Server return %s error code. Unauthorized: Authentication credentials invalid or not authorised to access resource", $this->response->getStatusCode()),
259
+
$statusCode,
260
+
$this->response->getBody(true)
261
+
);
257
262
case403:
258
-
thrownew \Exception(sprintf("Server return %s error code. Rate limit exceeded: Too many requests in the current time window", $this->response->getStatusCode()));
259
-
returnfalse;
260
-
break;
263
+
throw ApiException::create(
264
+
sprintf("Server return %s error code. Rate limit exceeded: Too many requests in the current time window", $this->response->getStatusCode()),
265
+
$statusCode,
266
+
$this->response->getBody(true)
267
+
);
261
268
case404:
262
-
thrownew \Exception(sprintf("Server return %s error code. Invalid resource: Invalid resource specified or resource not found", $this->response->getStatusCode()));
263
-
returnfalse;
264
-
break;
269
+
throw ApiException::create(
270
+
sprintf("Server return %s error code. Invalid resource: Invalid resource specified or resource not found", $this->response->getStatusCode()),
271
+
$statusCode,
272
+
$this->response->getBody(true)
273
+
);
265
274
default:
266
-
thrownew \Exception(sprintf("Server return %s error code.Server error: An error on the server prohibited a successful response; please contact support. %s", $this->response->getStatusCode(), $this->response->getBody(true)));
267
-
returnfalse;
268
-
break;
275
+
throw ApiException::create(
276
+
sprintf("Server return %s error code.Server error: An error on the server prohibited a successful response; please contact support. %s", $this->response->getStatusCode(), $this->response->getBody(true)),
0 commit comments