13
vnd.error Ben Longden @blongden

vnd.error

  • Upload
    inviqa

  • View
    326

  • Download
    0

Embed Size (px)

DESCRIPTION

vnd.error

Citation preview

Page 1: vnd.error

vnd.errorBen Longden

@blongden

Page 2: vnd.error

2012-04-24

Page 3: vnd.error

Custom hypermedia format

Page 4: vnd.error

100% compatible with HAL

Page 5: vnd.error

XML and JSON variants

Page 6: vnd.error

XML and JSON variants

Page 7: vnd.error

Multiple errors

Page 8: vnd.error

{ "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://.../" } } } ] }}

Page 9: vnd.error

Nested errors

Page 10: vnd.error

{ "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" } } } ] }}

Page 11: vnd.error

Link relationsdescribes, help, about

Page 12: vnd.error

ProfileEDN Representation

Page 13: vnd.error

ALPS