Error Handling #
<?php
try {
$result = $kuzzle->checkToken('some jwt token');
}
catch (ErrorException $e) {
var_dump($e->status . ': ' . $e->message);
}
All methods that accept a callback as an argument can return an error. The error can be generated directly by the SDK, or by Kuzzle and included in the response to a request.
All errors generated by Kuzzle contain the following properties:
message
: the error messagestatus
: an error code following the HTTP standard
Edit this page on Github(opens new window)