Re: [akka-user] Akka-HTTP: accessing the path in a rejection handler

2017-01-10 Thread Alan Burlison
> I added this to the docs in case it wasn't obvious at first sight: > https://github.com/akka/akka-http/pull/744 Works a treat, thank you :-) -- Alan Burlison -- -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

Re: [akka-user] Akka-HTTP: accessing the path in a rejection handler

2017-01-10 Thread Konrad Malawski
Read up on the various directives available, like extractUnmatchedPath etc. Since handlers are simply Routes you can do whatever you want in there, including: .handleNotFound { extractUnmatchedPath { p ⇒ complete((NotFound, "The requested resource could not be found. Was: " + p)) } } I

[akka-user] Akka-HTTP: accessing the path in a rejection handler

2017-01-10 Thread Alan Burlison
I have a rejection handler that handles non-existent paths via handleNotFound. However I can't seem to find an obvious way of accessing the path in question so it can be displayed/logged by the handler. Is there a way? -- Alan Burlison -- -- >> Read the docs: http://akka.io/docs/