Upload
inviqa
View
326
Download
0
Tags:
Embed Size (px)
DESCRIPTION
vnd.error
Citation preview
vnd.errorBen Longden
@blongden
2012-04-24
Custom hypermedia format
100% compatible with HAL
XML and JSON variants
XML and JSON variants
Multiple errors
{ "total": 2, "_embedded": { "errors": [ { "message": "\"username\" field validation failed", "logref": 50, "_links": { "help": { "href": "http://.../" } } }, { "message": "\"postcode\" field validation failed", "logref": 55, "_links": { "help": { "href": "http://.../" } } } ] }}
Nested errors
{ "message": "Validation failed", "logref": 42, "_links": { "describes": { "href": "http://path.to/describes" }, "help": { "href": "http://path.to/help" }, "about": { "href": "http://path.to/user/resource/1" } }, "_embedded": { "errors": [ { "message": "Username must contain at least three characters", "path": "/username", "_links": { "about": { "href": "http://path.to/user/resource/1" } } } ] }}
Link relationsdescribes, help, about
ProfileEDN Representation
ALPS