Getting Started

Filestack Architecture

File Upload

File Export (Save To)

Responsive Images

Image Transformations

Document Transformations

Video Transcoding

Audio Transcoding





Filestack Viewer


Supported Cloud Drives

Filestack Recipes

Filestack Integrations

Filestack SDKs

Register for an API key

Error Handling

While you're developing your application, you may run into situations where things don't quite work out how you'd like. We've tried to develop the library in a way that helps you get through those moments as painlessly as possible.

To give you additional debugging help while you're developing while still keeping the size of the main library as small as possible, we have a separate debugging script that provides more detailed error messages and other helpful functionality. The error code has not changed with v2, you should use the below code for both v1 and v2.
Sample Code
<script src=""></script>

There are two types of errors utilized in the Filestack files javascript library:


FilestackException objects are thrown when a coding error has been made, in an effort to make the problem as apparent as possible to the developer. This is things like forgetting to put in your API key, not passing in the right type of argument to a function, etc. You should not have to use try-catch blocks with these, as they are designed to be noticed and fixed before going into production code.


FPError objects are the objects passed back to the onError callback functions, and represent situations where something bad happened that couldn't have been predicted ahead of time, such as server timeouts, browser limitations, missing urls, etc. Each one has a unique code that can help you determine the type of error and the appropriate response. You should have code that handles the different types of errors and takes the appropriate action in each case.

Apart from the FPError types specific to each call, there are the following "general" errors, with codes as follows:

400 Bad parameters were passed to the server. This often will be the case when you turned on security but haven't passed up a policy or signature.
403 Invalid request - The policy and/or signature don't allow you to make this request. For more information see Security Documentation.

We're also available on Stack Overflow if you need any help, or reach out to us at if you think there's a bug.