vronic / chrome-rest-client

Automatically exported from code.google.com/p/chrome-rest-client
0 stars 0 forks source link

An invalid or illegal string was specified. #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Select HTTP PUT
2. Enter the following text in HEADERS - RAW

{
  name: "Nintendo"
}

3. The following exception is thrown:

(SYNTAX_ERR) 
 code: 12
 stack: Error: An invalid or illegal string was specified.
    at qT (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:469:409)
    at Object._.rc (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:557:22)
    at Object._.vc (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:89:170)
    at chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:88:267
    at chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:1129:235
    at chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/background.js:114:3
    at handleInternalMessage (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/background.js:183:3)
    at window.requestAction (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/background.js:113:2)
    at Object.<anonymous> (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:88:295)
    at Object.callback (chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/restclient/restclient.nocache.js:1129:235)
 INDEX_SIZE_ERR: 1
 DOMSTRING_SIZE_ERR: 2
 HIERARCHY_REQUEST_ERR: 3
 WRONG_DOCUMENT_ERR: 4
 INVALID_CHARACTER_ERR: 5
 NO_DATA_ALLOWED_ERR: 6
 NO_MODIFICATION_ALLOWED_ERR: 7
 NOT_FOUND_ERR: 8
 NOT_SUPPORTED_ERR: 9
 INUSE_ATTRIBUTE_ERR: 10
 INVALID_STATE_ERR: 11
 SYNTAX_ERR: 12
 INVALID_MODIFICATION_ERR: 13
 NAMESPACE_ERR: 14
 INVALID_ACCESS_ERR: 15
 VALIDATION_ERR: 16
 TYPE_MISMATCH_ERR: 17
 SECURITY_ERR: 18
 NETWORK_ERR: 19
 ABORT_ERR: 20
 URL_MISMATCH_ERR: 21
 QUOTA_EXCEEDED_ERR: 22
 TIMEOUT_ERR: 23
 INVALID_NODE_TYPE_ERR: 24
 DATA_CLONE_ERR: 25: SYNTAX_ERR: DOM Exception 12

What is the expected output? What do you see instead?

Clearly this is caused by user error.
1. I entered JSON into the header window instead of payload window
2. The JSON I entered is invalid ("name" is missing quotes)

Expected behavior: A user-friendly message indicating the headers could not be 
parsed and an indication of the position that triggered the error.

Original issue reported on code.google.com by cow...@bbs.darktech.org on 9 Nov 2012 at 2:50

GoogleCodeExporter commented 8 years ago
Thank you for this report. I'll do some more user friendly dialogs :)

Original comment by jarro...@gmail.com on 9 Nov 2012 at 4:04

GoogleCodeExporter commented 8 years ago

Original comment by jarro...@gmail.com on 25 Nov 2012 at 6:25