Skip to content

fix(cli): return consistent authentication error#2450

Merged
migmartri merged 1 commit into
chainloop-dev:mainfrom
migmartri:2443-test
Sep 30, 2025
Merged

fix(cli): return consistent authentication error#2450
migmartri merged 1 commit into
chainloop-dev:mainfrom
migmartri:2443-test

Conversation

@migmartri

@migmartri migmartri commented Sep 30, 2025

Copy link
Copy Markdown
Member

The problem was that the attestation process wrapped the error in the CLI, but our code wasn't checking actual wrapped errors—just the messages. By extending the isWrappedError function to support both behaviors, we can make it work.

$ go run main.go att init --workflow test --project bar
This command is will run against the organization "chainloop"
Please confirm to continue y/N
y
ERR your authentication token has expired, please run chainloop auth login again
exit status 1

Fixes #2434

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri merged commit 7b62a50 into chainloop-dev:main Sep 30, 2025
13 checks passed
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.

parsing authentication shows confusing error

2 participants