mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-06 23:58:35 +00:00
Requests with the user's token threw a bare ResourceException with a message like "… for resource [Anikeen\Id\Resources\Order]" and no error code, while app requests threw ApiException. Both throw ApiException now: status (also getCode()), Anikeen ID's error code and message, isNotFound(), isConflict(), isTemporary(). Failed lists throw CollectionException, now a subclass of ApiException. A request without a response (connection refused, timeout) throws ApiException with status 0 instead of a Guzzle exception. ApiException extends ResourceException, so existing catch blocks keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
223 B
PHP
12 lines
223 B
PHP
<?php
|
|
|
|
namespace Anikeen\Id\Exceptions;
|
|
|
|
/**
|
|
* A list request failed. Like ApiException it carries the HTTP status (also as getCode()) and
|
|
* Anikeen ID's error code.
|
|
*/
|
|
class CollectionException extends ApiException
|
|
{
|
|
}
|