Newer Version Available

This content describes an older version of this product. View Latest

Error Handling with the AJAX Toolkit

The AJAX Toolkit provides the ability to handle errors for synchronous and asynchronous calls:

Error Handling for Synchronous Calls

If the API call fails, then the AJAX Toolkit throws an exception. The exception contains all the available error information. For example:

Error Handling for Asynchronous Calls

For asynchronous calls, the onFailure property of the asynchronous object is called. For example:

If the onFailure property was not defined, the AJAX Toolkit pops up a new read-only browser window showing the error.