Configuring Wallet Error Behaviour
NOTE: Self-Hosted customers have the ability to define these conditions themselves within ThrillGate. If you are a SaaS customer, you will need to request any specific rules that you wish you to have via your Account Manager
It is possible to configure the way ThrillGate reacts to specific wallet errors.
The standard wallet error structure is defined as:
{
"code": String,
"message": String
}
Therefore, if your wallet need to respond with a 403
error (for example), the response would be:
HTTP Error Code: 403
Body:
{
"code": "FORBIDDEN",
"message": "",
}
Now, if you wanted to configure ThrillGate to never retry when your wallet returns a 403
error, you could add the following sub-document to your wallet's config
field:
{
...
"config": {
"error_response_rules": {
"403:FORBIDDEN": {
"must_retry": false
}
}
}
}
From this example, you can see that you can also specialise specific errors based on their code
value in the error response.
In other words, you could create different rules for handling a 400
error with code
set to INVALID_STRUCTURE
and separate rules for 400
with code set to INVALID_PROPERTY_VALUE
.
This type of control can be useful if your wallet has specific requirements for retry or cancellation handling from ThrillGate.
The error_response_rules
object structure is defined as:
{
"HTTP_ERROR_CODE:ERROR_CODE_VALUE": {
"must_retry": Boolean,
"must_cancel": Boolean,
}
}
Both must_retry
and must_cancel
are optional values and default to true
if not set.