Closed
Bug 859055
Opened 11 years ago
Closed 11 years ago
Display JSON as plain text when encountering errors when parsing
Categories
(DevTools :: Netmonitor, defect, P2)
DevTools
Netmonitor
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: vporof, Assigned: vporof)
Details
Attachments
(2 files, 1 obsolete file)
19.23 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
965.49 KB,
image/png
|
Details |
Sometimes a server may specify a json response content type, but the payload could be malformed. In that case, errors encountered when parsing JSON could be shown in the UI. Right now nothing is displayed (not even the response text!).
Assignee | ||
Comment 1•11 years ago
|
||
Moving into Developer Tools: Netmonitor component. Filter on NETMONITORAMA.
Component: Developer Tools → Developer Tools: Netmonitor
Summary: [netmonitor] Display encountered errors when parsing JSON → Display encountered errors when parsing JSON
Assignee | ||
Comment 2•11 years ago
|
||
Aside from the "Yo, you have an error" message, the response should be shown as plain text in a source editor.
Priority: -- → P2
Summary: Display encountered errors when parsing JSON → Display JSON as plain text when encountering errors when parsing
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Forgot to add the "Yo, you have an error" message in the Response tab. Now it's in. Enjoy. It's pretty.
Attachment #759114 -
Attachment is obsolete: true
Attachment #759114 -
Flags: review?(rcampbell)
Attachment #759138 -
Flags: review?(rcampbell)
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Green: https://tbpl.mozilla.org/?tree=Try&rev=3d4b4fa8d413
Comment 7•11 years ago
|
||
Comment on attachment 759138 [details] [diff] [review] v2 Review of attachment 759138 [details] [diff] [review]: ----------------------------------------------------------------- hot. ::: browser/devtools/netmonitor/netmonitor-view.js @@ +1647,5 @@ > + let infoHeader = $("#response-content-info-header"); > + infoHeader.setAttribute("value", parsingError.message); > + infoHeader.setAttribute("tooltiptext", parsingError.toString()); > + infoHeader.hidden = false; > + } I think I've stared at this long enough. ::: browser/devtools/netmonitor/test/browser_net_json-malformed.js @@ +63,5 @@ > + "The mode active in the source editor is incorrect."); > + > + teardown(aMonitor).then(finish); > + }); > + }); yarp!
Attachment #759138 -
Flags: review?(rcampbell) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/6f1899c6e4e0
Whiteboard: [fixed-in-fx-team]
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6f1899c6e4e0
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•