Skip to content

Conversation

@marten-seemann
Copy link
Contributor

Fixes smallstep/cli#841.

Surprisingly (to me), errs.NotFound does NOT return an errors that JSON-serializes the error message. Instead, it always serializes the default error message ("The requested resource could not be found. Please see the certificate authority logs for more info.").

I assume this is intended to hide internals of the error (although this isn't documented anywhere), so I didn't change this behavior. Instead, I'm using the slightly convoluted errs.NotFoundErr with an option to create an error that actually serializes the error message we want to display to the user. I also updated the test case to check for this message.

@marten-seemann marten-seemann requested a review from hslatman June 20, 2024 04:17
@github-actions github-actions bot added the needs triage Waiting for discussion / prioritization by team label Jun 20, 2024
@marten-seemann marten-seemann force-pushed the root-not-found-error-message branch from 0a8bcd7 to 38733da Compare June 20, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unclear error when CA fingerprint does not match

2 participants