Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
case class ErrorResponseBody private(
`type`: URI,
title: String
private val rfc7807RejectionHandler = RejectionHandler.default.mapRejectionResponse {
case res @ HttpResponse(_, _, entity: HttpEntity.Strict, _) =>
val message =
entity = HttpEntity(
ErrorResponseBody(new URI("about:blank"), message).toJson.prettyPrint
case x => x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.