Error handling is one of the most procrastinated and least enjoyable parts when writing code… I mean, why should the application not always work as expected, when we’ve written it with so much passion and care, and, you know, the clients of the application always send the right requests, right?!? Unfortunately things do go wrong from time to time, and when it does we should be prepared to some extent at least… This is especially the case when writing REST APIs, because clients only get a black box with specification, having no clue what to do when the expected answer doesn’t come back, unless we do something about it…
Bottom line: error handling is essential when designing REST APIs.