ProblemType
A problem type carrying the three things §4 asks a type author to define: a type URI, a title, and the HTTP status code to use with it. Implementing this interface states those three once, instead of restating them at every throw site.
ProblemType.title describes the type, so it is not overridable per problem. §3.1 asks it to stay constant except for localization, which is out of scope for v1. Only the detail and instance of ProblemType.problem vary per occurrence.
See also
Functions
Link copied to clipboard
fun ProblemType.exception(detail: String? = null, instance: String? = null, cause: Throwable? = null): ProblemException
Raises this problem type as a ProblemException.