[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

(no description)

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

Defines 1 class

ResponseException:: (2 methods):
  fromMissingData()
  fromInvalidData()


Class: ResponseException  - X-Ref

Exception class for HTTP response errors.

This is used when response data is unexpected or malformed,
typically indicating that a provider changed in ways our code
is not aware of or when parsing response data fails.

fromMissingData(string $apiName, string $fieldName)   X-Ref
Creates a ResponseException for missing expected data.

return: self
param: string $apiName The name of the API/provider.
param: string $fieldName The field that was expected but missing.

fromInvalidData(string $apiName, string $fieldName, string $message)   X-Ref
Creates a ResponseException from invalid data in an API response.

return: self
param: string $apiName The name of the API service (e.g., 'OpenAI', 'Anthropic').
param: string $fieldName The field that was invalid.
param: string $message The specific error message describing the invalid data.



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