I'd like to make a custom leaf page when I get 404 in Vapor 3.1.0. I've searched the web for it and even in the docs, I couldn't find out. How could I do it?
Thank you
I'd like to make a custom leaf page when I get 404 in Vapor 3.1.0. I've searched the web for it and even in the docs, I couldn't find out. How could I do it?
Thank you
Check out https://github.com/brokenhandsio/leaf-error-middleware which provides a solution for doing what you want!
Basically it replaces the error middleware and loads up 404.leaf
or serverError.leaf
for the different errors.