Error Handling

This section serves as a comprehensive reference for our API's HTTP status codes and error messages. Familiarizing yourself with this information is crucial for efficient error handling and successful API integration. The table provided below contains a detailed list of HTTP status codes, their meanings, and actionable steps to resolve them.

HTTP Status CodeError TypeDescription
400Bad requestThe request could not be understood or was missing required parameters.
401UnauthorizedAccess to the API is denied due to invalid or missing authentication credentials.
500Internal Server ErrorInternal server error. An unexpected error occurred, preventing the request from being processed.

For the 400 Bad request status code, we have defined several subtypes, which are explained in the subsequent table.

SubtypeDescription
Invalid data format. Expected JSON.Invalid data format. Please ensure that the content type (Content-Type Header) of the request is set to "application/json".
Image URL is missing.Image URL is missing. Please make sure the request body includes the "img_url" field and provide a valid image URL.
Invalid image URL.Invalid image URL. Please ensure the provided image URL follows a valid format.
Failed to download the image.Failed to download the image. This could be due to an invalid image URL, inaccessible image, or other errors that occurred during the download process.
Error processing the photo. Please upload a clear, front-facing photo with a natural smile and the full face visible.There was an error processing the photo. Please ensure that a clear, front-facing photo is uploaded with a natural smile and the full face visible. The photo should not be tilted, and intentionally protruding teeth should be avoided.