Forums

Get better insight into a failing route

Is there another way to diagnose a failing route in production other than checking available logs ? I've got a failing route that doesn't fail in development. When I look into logs available to me on PA it doesn't show any error but the route fails anyway.

Is there another way to diagnose a failing route or do I need to configure Flask's logger ?

Only exceptions that are not caught by your code or your framework will make it to your error log. If you're getting an error from a route that's not making it to the error log, then either you're catching the exception in your code or your framework.

You can also, if you like, add logging to your view - prints to stderr will appear in your error log. Then you can use the output to gain insight into what might be wrong.