Dealing with Error Handling in APIs

A good API that does everything right but completely ignores how to handle errors in a sane, graceful way is many things, but not actually a good API! You need to treat dealing with errors, exceptions, and issues in a way that makes it easier for your end users and consumers to be able to appropriately deal with the error and resolve things in meaningful ways. For us to do that, we'll again need to take a quick sidebar and implement another route, since that will make building up our API error handling a lot simpler in the long run.

Get Phoenix Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.