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

Error when launching a job: return the error #124

Open
Sispheor opened this issue Sep 25, 2023 · 3 comments
Open

Error when launching a job: return the error #124

Sispheor opened this issue Sep 25, 2023 · 3 comments

Comments

@Sispheor
Copy link

Hello there 👋

When a job fail the current behavior is to only log and return None.

Would it be possible to return the error? Could be useful 😁

Thanks !

@Sispheor
Copy link
Author

Maybe raising an exception here as we already have AuthFailed, SSLError, ConnectionError.

@costastf
Copy link
Collaborator

costastf commented Sep 26, 2023

Hi @Sispheor , thanks for reporting. It is kind of a chosen pattern to return None in case of error in most of the codebase,
like can be seen here

if not response.ok:
and many other places. Raising an exception of course also makes sense but it means something completely different and would be a major change. I am not opposed to that just want to put this out there and see whether in other cases where the error is silent is actually the preferred response in which case we need to consider which way to go.

@Sispheor
Copy link
Author

Maybe you can set this as config flag (raise_on_error) with default false to match the current behavior.

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

2 participants