Problem JSON by Conta
This library simplifies the implementation of the application/problem+json format described in RFC 7807 for JVM applications.
It includes:
-
A core API (
conta-problem-json-api) withProblem,ThrowableProblemand theProblemCodeinterface. -
A Micronaut server integration (
conta-problem-json-mn) that translates thrown problems intoapplication/problem+jsonHTTP responses and handles validation errors automatically. -
A Micronaut client integration (
conta-problem-json-mn-client) that forwards problem responses received from upstream services as newThrowableProbleminstances.
Where to go next
-
Concepts — the JSON shape and the fields the library adds on top of RFC 7807.
-
Installation — wiring the library into a Micronaut build.
-
Usage — throwing a
Problemfrom a controller. -
Defining Problem Codes — defining application-specific problem codes.
-
Forwarding Upstream Problems — forwarding upstream problems through Micronaut clients.