# Errors

### Errors

The Abyssale Generation API (synchronous or asynchronous) can return the following error codes :

| Code                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **`400`**                                                                     | <p><strong>Bad Request</strong><br>Your request is invalid. Either one of the parameter sent in the request is wrong or the generation failed due to one of the given property. You can find the full list <a href="#http-error-400-details">below</a></p><p></p><p>A payload will be returned in the HTTP response explaining the error.</p><p></p><p><em>For instance, here are payloads returned:</em> </p><ul><li>If a given parameter is invalid <em>(here the given color is invalid)</em>:</li></ul><p><code>{"message": "body\_validation\_errors: {'media': {'text\_role': \["The following property is invalid: ({'color': \['Must be an hexadecimal color. i.e. #EAEAEA']})."]}}", "errors": {"media": {"text\_role": \["The following property is invalid: ({'color': \['Must be an hexadecimal color. i.e. #EAEAEA']})."]}}}</code></p><ul><li>If a text cannot be inserted:</li></ul><p><code>{"id": "cannot\_build\_banner", "message": "Element text\_name error: The text 'Welcome to the Abyssale Developer Hub' cannot fit within the defined space."}</code></p> |
| <p><strong><code>401</code></strong><br><strong><code>403</code></strong></p> | <p><strong>Unauthorized</strong><br>Ensure your API key is the right one.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **`404`**                                                                     | <p><strong>Not Found</strong> <br>The route (or the given design) cannot be found.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **`405`**                                                                     | <p><strong>Method Not Allowed</strong><br>You tried to access Abyssale with an invalid method.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **`429`**                                                                     | <p><strong>API Limits reached</strong><br>All of your image generation API calls are consumed: You should upgrade to a higher plan.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **`500`**                                                                     | <p><strong>Internal Server Error</strong><br>Try again later: Contact us on <code><help@abyssale.com></code> if the error occurs.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

### HTTP Error 400:  Details

| Error                           | Description                                                                                                                                                                                          |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Invalid Image                   | The given image cannot be identified. Only jpeg,png,webp,gif,tiff & svg files are allowed.                                                                                                           |
| SVG security error              | The provided SVG contains security issues. Please make sure that the version is at least 1.1 (you can also use the following tool to optimize your file: <https://jakearchibald.github.io/svgomg/>). |
| Large SVG error                 | The SVG file provided cannot be processed properly (either too large or too heavy). Please use another svg file or a rasterised image (png, jpeg, webp).                                             |
| QR code not supported extension | The QRCode Icon filetype is not supported (supported types: png,jpeg,webp,tiff & gif)                                                                                                                |
| Text too long                   | The text cannot fit within the defined space.                                                                                                                                                        |
| InvalidFont                     | The font does'nt exist                                                                                                                                                                               |
| Button text too long            | The text cannot fit within the defined space.                                                                                                                                                        |
| InvalidI ilustration            | The illustration doesn't exist                                                                                                                                                                       |
