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

Improved upload error reporting #213

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Conversation

dogversioning
Copy link
Contributor

This PR makes the following changes:

  • Switches to the builtin response.raise_for_status() function for error generation on rejected uploads for nicer formatting
  • Catches the RequestException gracefully rather than dumping a stack trace

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added
  • Update template repo if there are changes to study configuration

upload.upload_files(args)
except requests.RequestException as e:
print(str(e))
exit()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be sys.exit, yeah?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, was just getting to that

@dogversioning dogversioning merged commit 7dedf01 into main Apr 18, 2024
3 checks passed
@dogversioning dogversioning deleted the mg/upload_error_handling branch April 18, 2024 19:31
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

Successfully merging this pull request may close these issues.

2 participants