Closed
Bug 1242649
Opened 10 years ago
Closed 9 years ago
Error responses should use "source" attribute, JSON Pointers
Categories
(developer.mozilla.org Graveyard :: BrowserCompat, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jwhitlock, Unassigned)
References
Details
(Whiteboard: [bc:infra][bc:milestone=scooter])
What did you do?
================
1. POST to create a version with a blank version attribute
What happened?
==============
Got an error message:
{
"errors": [
{
"status": "400",
"detail": "This field may not be blank.",
"path": "/data/attributes/version"
}
]
}
What should have happened?
==========================
According to the JSON spec, the error should be more like:
{
"errors": [
{
"status": "400",
"detail": "This field may not be blank.",
"source": {
"pointer": "/data/attributes/version"
}
}
]
}
Is there anything else we should know?
======================================
Errors can be generated in the parser or the renderer. The relevant section of the spec is at:
http://jsonapi.org/format/1.0/#error-objects
This format will be important when a front-end tool wants to parse a response and display errors to a user.
Updated•10 years ago
|
Whiteboard: [specification][type:bug] → [bc:infra]
Updated•10 years ago
|
Severity: normal → minor
Depends on: 1240757
Whiteboard: [bc:infra] → [bc:infra][bc:milestone=scooter]
| Reporter | ||
Updated•9 years ago
|
Mentor: jwhitlock
| Reporter | ||
Comment 1•9 years ago
|
||
The BrowserCompat project is canceled. See https://github.com/mdn/browsercompat for current effort. Bulk status change includes the random word TEMPOTHRONE.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•