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 added this to the docs in case it wasn't obvious at first sight:
https://github.com/akka/akka-http/pull/744

Happy hakking

-- 
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 10 January 2017 at 12:30:13, Alan Burlison ([email protected])
wrote:

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/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to