Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error handler returns html page to CLI #63

Open
Iain-S opened this issue Jan 8, 2025 · 0 comments
Open

404 error handler returns html page to CLI #63

Iain-S opened this issue Jan 8, 2025 · 0 comments

Comments

@Iain-S
Copy link
Contributor

Iain-S commented Jan 8, 2025

If you are using the CLI and the CLI accesses a route that doesn't exist, our 404 handler (see main.py) returns a custom 404 web page. As a CLI user, it is confusing to receive a large amount of HTML when a simpler text message would do.

Joe's comment:

I think we should provide a wrapper for this in the CLI. ATM we check for a response code outside the range of 200-299 and return the status code and details if outside the range. We could just add logic that checks if the response status code is 404 and display a custom message if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant