Skip to content

fix: improve error message for generic openid-client error MONGOSH-2487 #230

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

Merged
merged 4 commits into from
Aug 13, 2025

Conversation

addaleax
Copy link
Contributor

Similar to previous commits, this change ensures that diagnostic information is not lost through recent changes to openid-client's error system, where currently a number of errors are grouped together under "something went wrong" (https://github.com/panva/openid-client/blob/a1e4a4fd88fcdff12d88e3ff73f3e27fe5df4252/src/index.ts#L975) and the library expects consumers to consistently expose the cause property of the error object.

This also unifies the two existing messageFromError and errorString implementations, which happened to duplicate each other.

Similar to previous commits, this change ensures that diagnostic information
is not lost through recent changes to openid-client's error system, where
currently a number of errors are grouped together under "something went wrong"
(https://github.com/panva/openid-client/blob/a1e4a4fd88fcdff12d88e3ff73f3e27fe5df4252/src/index.ts#L975)
and the library expects consumers to consistently expose the `cause` property
of the error object.

This also unifies the two existing `messageFromError` and `errorString`
implementations, which happened to duplicate each other.
@github-actions github-actions bot added the fix label Aug 13, 2025
@addaleax addaleax merged commit cb07f51 into main Aug 13, 2025
19 checks passed
@addaleax addaleax deleted the 2487-dev branch August 13, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants