[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Providers/Http/Exception/ -> ClientException.php (summary)

(no description)

File Size: 68 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ClientException:: (2 methods):
  getRequest()
  fromClientErrorResponse()


Class: ClientException  - X-Ref

Exception thrown for 4xx HTTP client errors.

This represents errors where the client request was malformed,
unauthorized, forbidden, or otherwise invalid.

getRequest()   X-Ref
Returns the request that failed as our Request DTO.

return: Request

fromClientErrorResponse(Response $response)   X-Ref
Creates a ClientException from a client error response (4xx).

This method extracts error details from common API response formats
and creates an exception with a descriptive message and status code.

return: self
param: Response $response The HTTP response that failed.



Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref