Parakey uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success and codes in the 4xx range indicate an error, given the information provided (e.g., required parameters). Codes in the 5xx range indicate an error with Parakey's servers.
How to handle errors from Parakey
It is important that you handle the errors from Parakey in one of two ways:
- Send request and wait for a successful response
Send the request to the Parakey API and wait for the response before you continue. If the call failed, do not continue with the registration/booking. Instead, let the user retry again until the request goes through.
- Send a request in background, retry and notify on failure
Send the request asynchronously, but have a retry mechanism that will make sure to retry the call later. We recommend using a factor that increases the time between each retry, please do not try more than once every minute and not more than 10 times for each request.
If the call fails even after a few retries it is important that this is visible for the user in some way. Either by sending an email notification to the user to show it in your interface somehow. That the mobile key has not been created.