|
Error Handling |
|
Responses form the JSON API web service contain a list of results corresponding to each of the command that was submitted. Each result may contain either a "result" : { } pair that lists the command return values (if any), or the "errors" : [ ] pair that lists the errors returned by the command. If an error occurs during processing a request having multiple commands, the service stops execution of further commands and sends a response object with the results of preceding commands and the error description for the current command. The Format of Error Descriptions The returned "errors" : [ ] pair holds an array with one or more error descriptions. Each error description has the following fields:
Sample Error Descriptions Below are several examples of error descriptions:
[ { "errors" : [ { "code" : "NoSuchCommand", "message" : "The command 'ServerInfoService.getVersion()' does not exist." } ] } ]
[ { "errors" : [ { "code" : "AuthenticationFailed", "message" : "Could not authenticate user 'jsmith' using password provided." } ] } ] |
|
© 2003-2025 SmartBear Software. All rights reserved. |