Status codes

The FSP (File system provider) API uses standard HTTP status codes to manage success and error responses. Status codes include:

Action On success On error On failure
List directory 200 OK 503 Service Unavailable 401 Unauthorized, 404 Not Found
Create directory 201 Created 503 Service Unavailable 401 Unauthorized, 403 Forbidden (parent is RO or non-existent; new dir already exists)
Delete directory 200 OK 503 Service Unavailable 401 Unauthorized, 403 Forbidden (if parent is RO), 404 Not Found
Get file metadata 200 OK 503 Service Unavailable 401 Unauthorized, 404 Not Found
Upload file 201 Created 503 Service Unavailable 401 Unauthorized, 403 Forbidden (if parent is RO or non-existent)
Delete file 200 OK 503 Service Unavailable 401 Unauthorized, 403 Forbidden (if parent is RO), 404 Not Found

 

 

If your API returns an error, the File Manager will show a generic error to the user, which changes depending on the language in which the editor is being viewed in. In English, the generic error is something like "Oops! Something went wrong."

The details of the error will not be displayed, even if they are contained in your API response.

Next: Generating and displaying thumbnails

Have more questions? Submit a request

Comments