File System Provider errors
Example Response
Error Codes
Code | Message | HTTP Status | Details |
---|---|---|---|
| FSP Error | 503 Service Unavailable | Default generic FSP Error |
| Something went wrong accessing backend filesystem | 503 Service Unavailable | Default generic Error |
| Resource not found | 404 Not Found | File or directory not found |
| Permission denied | 403 Forbidden | Permission denied to access a file or a directory |
| Resource Already Exists | 409 Conflict | File or directory already exists |
| File Not Uploaded | 422 Unprocessable Entity | Error during file upload |
| Request Error | 400 Bad Request | Server could not understand the request due to invalid syntax |
| User Error | 403 Forbidden | Not a valid S3 custom storage |
| Wrong Username or Password | 401 Unauthorized | Wrong user credentials |
from | Custom error message | Custom HTTP status code |
|
Displaying custom errors from your FSP API
You can return custom errors from your application that will be displayed in the file manager.
To do that we reserved codes from 3900 to 3999. An error sent with an error code number in this range displays the message as the error title and the details as the error text.
Example:
Your file storage doesn’t support file names with the character “?”
The front end doesn’t stop the upload, as this character is allowed by other APIs and storages
When your API gets the file, returns the following error: Code: 39105 HTTP Status: 400 Message: Upload error Details: The file name is not allowed. Please make sure it does not contain one or more of these characters: \ / < > ? |
The file manager inside the editor displays:
Last updated