Fork me on GitHub

Hi, is there any way to change the default not-found handler in untangled-server? I do not seem to be able to add my own not-found handler to my custom-routes


is there a way to set the not-found handler? at the moment the bidi-routes seem to hard-wire the not-found handler in untangled.server.impl.components.handler


If you use the modular server support, you can completely define your Ring stack


See the modular-server branch of the template


you could also plug into the hooks of the regular server...there is a fallback-hook described in!/untangled_devguide.M40_Advanced_Server_Topics


it comes just before the not-found, so you could put your logic there and never let if fall through further


Re: untangled css PR. Thanks for the input, I will try to have a look this weekend (only time I can have a look actually). Note: I use it with “plain" Om, so I am not familiar at all with untangled right now.


@jwkoelewijn take a look at, there’s a line that defines a function that returns {:status 404} if it ever gets called


I actually found a solution in Bidi by defining my routes as nested vectors instead of a map I was able to define a not-found handler that was only called whanever no other route matched (compared to adding the [true :not-found] route in the map syntax, that would always match as a result of the not being ordered properties of the map :))


I’ll take a look at your suggestions to see if I can use your suggestions to improve on my current solution, so lot of interesting stuff to look forward to


sure, that works too