Skip to content

Commit

Permalink
Call requestHandled method once the request have been completed in pl…
Browse files Browse the repository at this point in the history
…ay server
  • Loading branch information
Juan Javier committed Aug 11, 2020
1 parent e8cc055 commit ec62e01
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ trait TapirPlayServer {
val i = value.asInstanceOf[I]
e.logic(new FutureMonadError())(i)
.map {
case Right(result) => OutputToPlayResponse(ServerDefaults.StatusCodes.success, e.output, result)
case Left(err) => OutputToPlayResponse(ServerDefaults.StatusCodes.error, e.errorOutput, err)
case Right(result) => serverOptions.logRequestHandling.requestHandled(e.endpoint, ServerDefaults.StatusCodes.success.code)
OutputToPlayResponse(ServerDefaults.StatusCodes.success, e.output, result)
case Left(err) => serverOptions.logRequestHandling.requestHandled(e.endpoint, ServerDefaults.StatusCodes.error.code)
OutputToPlayResponse(ServerDefaults.StatusCodes.error, e.errorOutput, err)
}
}
def handleDecodeFailure(
Expand Down

0 comments on commit ec62e01

Please sign in to comment.