Skip to content
Ameen Abozaid
Planned lessonJNR-015-L04

Problem Details

  • Lesson 4 of 6
  • Junior
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 with setProperty, 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

json
{ "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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.