Closed
Bug 859055
Opened 13 years ago
Closed 13 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•13 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•13 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•13 years ago
|
||
| Assignee | ||
Comment 4•13 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•13 years ago
|
||
| Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 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•13 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Comment 9•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•