ContractChallengeRequestErrorResponse
extends Exception
in package
Exception thrown when requesting a contract challenge from the server fails.
This exception is thrown when the GET request to the WEB_AUTH_FOR_CONTRACTS_ENDPOINT fails or returns an error response. This can occur due to:
- Network connectivity issues
- Server returning an error (4xx or 5xx HTTP status codes)
- Invalid request parameters
- Server rate limiting
- Malformed response that cannot be parsed
The exception may contain the HTTP status code and error message from the server if available.
Common Scenarios:
- 400 Bad Request: Invalid account format, missing required parameters
- 404 Not Found: Endpoint not available or service not configured
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server-side error
Tags
Table of Contents
Methods
- __construct() : mixed
- Creates a new challenge request error exception.
- getHttpStatusCode() : int|null
- Returns the HTTP status code from the failed request.
Methods
__construct()
Creates a new challenge request error exception.
public
__construct(string $message[, int|null $httpStatusCode = null ]) : mixed
Parameters
- $message : string
-
error message describing the failure
- $httpStatusCode : int|null = null
-
HTTP status code from the failed request, if available
getHttpStatusCode()
Returns the HTTP status code from the failed request.
public
getHttpStatusCode() : int|null
Return values
int|null —the HTTP status code, or null if not available