Created
November 9, 2022 19:07
-
-
Save BetterProgramming/e40ecc9195f7ed1f64b3a22fcbe6b857 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Application.configureRouting() { | |
install(StatusPages) { | |
exception<RequestValidationException> { call, cause -> | |
call.respond(HttpStatusCode.BadRequest, | |
ErrorType.REQUEST_VALIDATION_FAILED.toErrorResponseDTO().copy(details = cause.reasons.joinToString())) | |
} | |
configureAuthorizedClientsStatusPages() | |
configureOtpStatusPages() | |
} | |
routing { | |
trace { application.log.trace(it.buildText()) } | |
configureOtpRoutes() | |
configureAuthorizedClientsRoutes() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment