Closed jsyrjala closed 12 years ago
Make a JSON response with status code 500.
{"error": {
"status-code": 500, // same as in HTTP
"message": "Internal server error",
"timestamp": "2012-06-07T00:23:12.123+0000", // makes log browsing easier
"stacktrace": ".... this only in development mode ..."
}}
Error messages look like this now:
{"error":{"message":"resource not found"}}
Catch exceptions and show 500 error when handling api requests fails. Currently connection is just closed.