This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28780 - 3.7 Handling Errors - Should first JSON field be called "status" and not "error"?
Summary: 3.7 Handling Errors - Should first JSON field be called "status" and not "err...
Status: RESOLVED FIXED
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 minor
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2015-06-08 14:37 UTC by Paul G
Modified: 2015-06-09 13:39 UTC (History)
3 users (show)

See Also:


Attachments

Description Paul G 2015-06-08 14:37:18 UTC
The following sentence uses "error" twice for JSON field names. Is this correct? Should one be "status"?

"This JSON body has two fields: error, containing a string indicating the error type and error containing an implementation-defined string containing a human readable description of the kind of error that occured."
Comment 2 Andreas Tolfsen 2015-06-08 15:01:17 UTC
Thanks for noticing this.  The body sent back as part of an error response should have three fields, of which two are implementation-defined (meaning they can be empty strings):

    {
      "error": "no such element",
      "message": "Could not locate element by locator: …",
      "stacktrace": ""
    }


I’ve opened https://github.com/w3c/webdriver/pull/87 to reflect this.

There are more commands that haven’t yet been changed to use the new dispatch architecture that still use the term “status”, but we can fix these as we redefine them.
Comment 3 David Burns :automatedtester 2015-06-09 13:39:56 UTC
landed in https://github.com/w3c/webdriver/commit/1f55f3ec285daf2665f28305c1e24595a4eb040e