Errors
In this guide, we will talk about what happens when something goes wrong while you work with the API. Let's look at some status codes and error types you might encounter.
You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong and do some rudimentary debugging.
Before reaching out to support with an error, please be aware that 99% of all reported errors are user errors. Please carefully check your code before contacting Felloh support.
Status Codes
Felloh uses standard HTTP response codes to indicate the success or failure of API requests.
- Name
200
- Type
- Description
OK: The request was successful.
- Name
201
- Type
- Description
Created: The request was successful, and a new resource was created.
- Name
204
- Type
- Description
No Content: The request was successful, but there is no response to send back.
- Name
400
- Type
- Description
Bad Request: The request was invalid, for example, due to missing headers.
- Name
401
- Type
- Description
Unauthorized: An access token wasn't provided, or the provided token was invalid.
- Name
403
- Type
- Description
Forbidden: A valid access token was provided, but it didn't have sufficient permissions.
- Name
404
- Type
- Description
Not Found: The requested resource doesn't exist.
- Name
406
- Type
- Description
Not Acceptable: The response type you requested with your Accept header isn't supported.
- Name
422
- Type
- Description
Unprocessable Entity: A validation error occurred.
- Name
429
- Type
- Description
Too Many Requests: You made too many requests to the API in a short period of time.
- Name
500
- Type
- Description
Internal Server Error: Something went wrong on our side. Contact support or try again later.
- Name
502
- Type
- Description
Bad Gateway: The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
- Name
503
- Type
- Description
Service Unavailable: The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later.
- Name
504
- Type
- Description
Gateway Timeout: The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Try again later.
Error Responses
Our API provides detailed information on what exactly went wrong, included in the response body. Every error returned by the API includes:
- Name
title
- Type
- Description
A quick and simple description of what went wrong.
- Name
message
- Type
- Description
A more detailed human-readable description of what went wrong.
- Name
documentation_url
- Type
- Description
A URL pointing to a place in our documentation where you can read about the error.
- Name
type
- Type
- Description
A machine-readable identifier for the general category of error.
- Name
code
- Type
- Description
A machine-readable identifier for this specific error.
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-json" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"data"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span class="token" style="color:#d4d4d4">}</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"errors"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">[</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"title"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"Transaction not found"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"message"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"The transaction id that you are attempting to access does not exist"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"documentation_url"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"https://developers.felloh.com/transaction"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"type"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"not_found"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"code"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"transaction.not_found"</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">]</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"meta"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"request_id"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#ce9178">"9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"</span><span class="token" style="color:#d4d4d4">,</span><span>
</span><span> </span><span class="token" style="color:#9cdcfe">"status"</span><span class="token" style="color:#d4d4d4">:</span><span> </span><span class="token" style="color:#b5cea8">404</span><span>
</span><span> </span><span class="token" style="color:#d4d4d4">}</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>
Error types
Whenever a request is unsuccessful, the Felloh API will return an error response with an error type and message. You can use this information to understand better what has gone wrong and how to fix it. Most of the error messages are pretty helpful and actionable.
Here is a list of two error types supported by the Felloh API — use these to understand what you have done wrong.
- Name
not_found
- Type
- Description
This means that the item you are looking for does not exist
- Name
validation_error
- Type
- Description
This means that the request that you have made is invalid
<div class="syntax-highlighter"><pre style="color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;padding:1em;margin:.5em 0;overflow:auto;background:#1b0f27"><code class="language-bash" style="white-space:pre;color:#d4d4d4;font-size:13px;text-shadow:none;font-family:Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;direction:ltr;text-align:left;word-spacing:normal;word-break:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none"><span class="token" style="color:#d4d4d4">{</span><span>
</span><span> </span><span class="token" style="color:#ce9178">"title"</span><span class="token" style="color:#4ec9b0">:</span><span> </span><span class="token" style="color:#ce9178">"Transaction not found"</span><span>,
</span><span> </span><span class="token" style="color:#ce9178">"message"</span><span class="token" style="color:#4ec9b0">:</span><span> </span><span class="token" style="color:#ce9178">"The transaction id that you are attempting to access does not exist"</span><span>,
</span><span> </span><span class="token" style="color:#ce9178">"documentation_url"</span><span class="token" style="color:#4ec9b0">:</span><span> </span><span class="token" style="color:#ce9178">"https://developers.felloh.com/transaction"</span><span>,
</span><span> </span><span class="token" style="color:#ce9178">"type"</span><span class="token" style="color:#4ec9b0">:</span><span> </span><span class="token" style="color:#ce9178">"not_found"</span><span>,
</span><span> </span><span class="token" style="color:#ce9178">"code"</span><span class="token" style="color:#4ec9b0">:</span><span> </span><span class="token" style="color:#ce9178">"transaction.not_found"</span><span>
</span><span></span><span class="token" style="color:#d4d4d4">}</span><span>
</span></code></pre></div>