CoinForBarter Errors
During your CoinForBarter integration, you may encounter some errors. These errors are categorized into three; validation errors, CoinForBarter errors, and provider errors.
They are usually returned in this format with the 400
HTTP status code:
{ "status" : "error", "message" : "invalid private key", "data": null }
Authorization Errors
Every call to our endpoints must be authorized by passing your secret key as a bearer token in the request header. When this is not the case, we return a 401
Unauthorized response:
{ "status" : "error", "message" : "Authorization required", "data": null }
Validation Errors
Validation errors are returned when one or more validation rules fail. Examples include not passing required parameters e.g. not passing the transaction/provider ref during a re-query call will result in a validation error. Here's a sample below:
{ "status": "error", "message": "Validation error", "data": { "errors": { "foo": [ "foo is required", "foo format is invalid" ], "bar": [ "bar is required", "bar is not required if foo is submitted" ] } } }
CoinForBarter Errors
CoinForBarter errors are a result of one of two reasons;
- An internal process error precluding a request from completing such as a server timeout
- An unauthorized oe failed request from the client
These errors include:
"CUSTOMER ALREADY EXISTS (409)"
This error occurs when you attempt to create a customer with an email already existing
"CUSTOMER NOT FOUND (404)"
This error occurs when you attempt to find a customer that does not exist in the database
"CUSTOMERS NOT FOUND (404)"
This error occurs when there is an empty list of customers based on query conditions
Note
Join Developers Channel on Slack
Join our developers channel to stay up to date on latest news and features. Find answers to your problems and network with other developers. Join Developers Channel.