-
Notifications
You must be signed in to change notification settings - Fork 3
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
[TRUNK-14370] Do not error on forbidden/unauthorized #443
base: main
Are you sure you want to change the base?
[TRUNK-14370] Do not error on forbidden/unauthorized #443
Conversation
Changes our exit logic to not use error reporting on forbidden/unauthorized errors. While I was there, added a nudge to check your token.
Merging to
|
cli/src/main.rs
Outdated
if status == StatusCode::UNAUTHORIZED || status == StatusCode::FORBIDDEN { | ||
tracing::warn!("Unauthorized to access trunk, are you sure your token is correct? {:?}", error); | ||
guard.flush(None); | ||
std::process::exit(exitcode::OK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a footgun when enabling trunk. If we exit success even though it's misconfigured you'll see the CI job succeed and assume all is well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair; I'll switch it to use the software exit code.
…ry-issues-on-user-config-401403-status
Changes our exit logic to not use error reporting on forbidden/unauthorized errors. While I was there, added a nudge to check your token.