O'Reilly logo

Spring REST by Sudha Belida, Balaji Varanasi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5

image

Error Handling

In this chapter we will discuss:

  • Handling errors in a REST API
  • Designing meaningful error responses
  • Validating API inputs
  • Externalizing error messages

Error handling is one of the most important yet somewhat overlooked topics for programmers. Although we develop software with good intent, things do go wrong and we must be prepared to handle and communicate those errors gracefully. The communication aspect is especially important to developers consuming a REST API. Well-designed error responses allow consuming developers to understand the issues and help them to use the API correctly. Additionally, good error handling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required