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

datasette --get exit code should reflect HTTP errors #947

Closed
simonw opened this issue Aug 23, 2020 · 1 comment
Closed

datasette --get exit code should reflect HTTP errors #947

simonw opened this issue Aug 23, 2020 · 1 comment

Comments

@simonw
Copy link
Owner

simonw commented Aug 23, 2020

If you run datasette . --get / and the result is a 500 or 404 error (anything that's not a 200 or a 30x) the exit code from the command should not be 0.

It should still output the returned content to stdout.

This will help with writing soundness checks, as seen in https://til.simonwillison.net/til/til/github-actions_grep-tests.md

@simonw
Copy link
Owner Author

simonw commented Sep 11, 2020

I'm going to use exit code 1 for any errors, be they 500 or 404.

@simonw simonw closed this as completed in d02f615 Sep 11, 2020
simonw added a commit that referenced this issue Sep 11, 2020
simonw added a commit that referenced this issue Sep 14, 2020
simonw added a commit that referenced this issue Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant