Problem Details
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
return the standard error body.
Planned topics
- RFC 9457 (which replaces RFC 7807) defines a JSON error format:
type,title,status,detail,instance. - Content type:
application/problem+json. - Spring has
ProblemDetail; you can add extra fields withsetProperty, for example field errors. - Spring can also produce Problem Details for its own errors when enabled; verify the property for your version before recording.
Draft outline details
Demonstration
{ "type": "about:blank", "title": "Not Found", "status": 404,
"detail": "Product 42 not found", "instance": "/products/42" }Check your understanding
What content type does Problem Details use?
Show answer
application/problem+json.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.