Created
May 23, 2013 19:21
-
-
Save jto/5638714 to your computer and use it in GitHub Desktop.
This file contains 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
val (untaggedRequestHeader, handler) = Exception | |
.allCatch[RequestHeader].either(tryToCreateRequest) | |
.fold( | |
e => { | |
val rh = createRequestHeader() | |
val r = server.applicationProvider.get.fold(e => DefaultGlobal, a => a.global).onBadRequest(rh, e.getMessage) | |
(rh, Left(r)) | |
}, | |
rh => (rh, server.getHandlerFor(rh))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment