(Web API) Common format for error messages

Registered by Morten Olav Hansen on 2014-06-11

We should create a common format for all our web-api error messages, this should at least contain:

status: ERROR / OK
message / devMessage: localized error message, devMessage is a common pattern to have a more technical explanation

The format of the error message should match the format from the Accept header.

Blueprint information

Status:
Complete
Approver:
Morten Olav Hansen
Priority:
Undefined
Drafter:
Morten Olav Hansen
Direction:
Approved
Assignee:
Morten Olav Hansen
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2.17
Started by
Morten Olav Hansen on 2014-10-13
Completed by
Morten Olav Hansen on 2014-10-14

Related branches

Sprints

Whiteboard

When we implement this we should also ensure that we ALWAYS respect the Accept header. Currently a client expecting an xml or json response is sometimes subjected to an html page eg. indicating an exception. It would be good to try and catch all these and send something in a format which the client is expecting

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.