API exceptions
If your application code catches an exception, you can inspect the exception message to gain insight into the problem and decide possible actions to take.
If an exception is returned for a failed task result and if it contains an embedded exception, i.e., an exception from the service, you can inspect the error code and error message for the embedded exception to see what went wrong in the service; refer to Error codes and embedded service exceptions for an example of how to retrieve an embedded exception. If there is no embedded exception, you can inspect the error message to determine the system reason for the failure. This information can be used to determine what the problem is and what actions to take.