Skip to content

Commit

Permalink
Merge pull request #705 from bracana/master
Browse files Browse the repository at this point in the history
Call requestHandled method once the request have been completed Play
  • Loading branch information
adamw authored Aug 11, 2020
2 parents 547ba7a + ec62e01 commit 46f04d9
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 46f04d9

Please sign in to comment.