registerProblem

abstract fun registerProblem(typeId: String, problemType: KClass<out ThrowableProblem>)

Register a type of Problem to allow decoding and throwing specific exception instances of the provided type when returned in server responses.

If a problem response is encountered that do not have a registered type, a generic Problem will be returned/thrown.

Parameters

typeId

Problem type id to register.

problemType

Problem subclass to map to typeId.