Skip to content

Instantly share code, notes, and snippets.

@adamw adamw/Logging.scala
Created Nov 18, 2019

Embed
What would you like to do?
override def openWebsocket[T, WS_RESULT](
request: Request[T, S],
handler: WS_HANDLER[WS_RESULT]): F[WebSocketResponse[WS_RESULT]] = {
responseMonad.map(responseMonad.handleError(delegate.openWebsocket(request, handler)) {
case e: Exception =>
logger.error(s"Exception when opening websocket: $request", e)
responseMonad.error(e)
}) { response =>
logger.debug(s"Websocket open: $request, with response headers: ${response.headers}")
response
}
}
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.