org.http4k.contract.ErrorResponseRenderer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http4k-contract Show documentation
Show all versions of http4k-contract Show documentation
http4k typesafe HTTP contracts and OpenApi support
package org.http4k.contract
import org.http4k.core.Response
import org.http4k.core.Status.Companion.BAD_REQUEST
import org.http4k.core.Status.Companion.NOT_FOUND
import org.http4k.lens.LensFailure
interface ErrorResponseRenderer {
fun badRequest(lensFailure: LensFailure) = Response(BAD_REQUEST)
fun notFound() = Response(NOT_FOUND)
}