Errors
This guide delves into the intricacies of error handling within API workflows. Recognizing that errors are inherent in technical processes, particularly stemming from client-side actions, we explore an array of status codes and error classifications that could potentially manifest during your API engagements.
Assessing the success of your API request hinges upon dissecting the status code embedded within the response. In scenarios where the response denotes an unsuccessful operation, the error type and accompanying message provide invaluable insights, facilitating preliminary troubleshooting efforts before resorting to seeking assistance.
Status codes
Below is a compilation of distinct categories of status codes returned by the Flick API. These codes serve as valuable indicators to ascertain the success or outcome of a given request.
- Name
200
- Type
- Description
Success — Indicates a successful response.
- Name
400
- Type
- Description
Bad Request — Which means the request was received as not intended.
- Name
500
- Type
- Description
Internal Server Error — That's on us. We will be taking care that soon!
Error types
Upon encountering an unsuccessful request, the Flick API promptly furnishes an error response complete with an error type and corresponding message. This essential data equips you with insights to diagnose the issue and determine the corrective measures required. Notably, a majority of our error messages are both informative and actionable, enhancing the troubleshooting process.
Outlined below are the two supported error types endorsed by the Flick API. Familiarize yourself with these categories to discern any missteps and their underlying causes effectively.
- Name
request_error
- Type
- Description
This means that the request body or request itself is malformed.
- Name
validation_error
- Type
- Description
This means that we there was an error in validating the request you provided.
- Name
server_error
- Type
- Description
This means that we are facing an issue with our Cloud Servers. Please wait for updates.
Sample Error Response
{
"code": "validation_error",
"message":
{
"email": "Should be a valid email address",
"password": "Must be at least 8 characters long"
}
}