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.
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.|