Thrown when a basket could not be found or is expired
Thrown when a request to the NextEvent API failed with an error response. The exception provides extensive information about the request sent, the response received and the reasons which it didn't succeed.
Use the toLogContext() or dumpAsString() methods for logging.
package |
NextEvent\PHPSDK\Exception |
---|
__construct(string|\Exception $message, integer $code, \Exception $ex = null)
string|\Exception
Error message or source exception
integer
Error code
\Exception
Previous exception
__toString() : string
string
dumpAsString(boolean $withStackTrace = false) : string
Including HTTP request, response and stack trace (optional)
boolean
Append stack trace to output
string
getDescription() : string
string
getRequest() : \GuzzleHttp\Psr7\Request
\GuzzleHttp\Psr7\Request
getRequestID() : string
Use this in support inquiries to let us track the request in our logs
string
getResponse() : \GuzzleHttp\Psr7\Response
\GuzzleHttp\Psr7\Response
getStatusCode() : integer|null|string
integer|null|string
toLogContext() : array
array