You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It swallows the error rather than making the program exit with a nonzero status.
Both things make oauth2l unsuitable for use in scripts in particular.
A naive fix would be to replace all these constructs with panic(err.Error()) but it would make more sense to rethrow (well, re-return) errors and add a global error handler that calls os.Exit(code), optionally with a specific code per error type.
I'd be willing to add the panic calls in a PR but I don't think I understand the codebase enough to start a more aggressive refactor.
The text was updated successfully, but these errors were encountered:
This construct occurs a bunch of times:
But:
Both things make oauth2l unsuitable for use in scripts in particular.
A naive fix would be to replace all these constructs with
panic(err.Error())
but it would make more sense to rethrow (well, re-return) errors and add a global error handler that callsos.Exit(code)
, optionally with a specific code per error type.I'd be willing to add the
panic
calls in a PR but I don't think I understand the codebase enough to start a more aggressive refactor.The text was updated successfully, but these errors were encountered: