Skip to content
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

Detailed error message for 'ConnectErrorKind' and 'ServerError' #1347

Open
eschmidt-WI opened this issue Nov 21, 2024 · 1 comment
Open

Detailed error message for 'ConnectErrorKind' and 'ServerError' #1347

eschmidt-WI opened this issue Nov 21, 2024 · 1 comment
Labels
proposal Enhancement idea or proposal

Comments

@eschmidt-WI
Copy link

eschmidt-WI commented Nov 21, 2024

Proposed change

As a user I wanna see a detailed error message when something is wrong.

Currently the types ConnectErrorKind and ServerError doesnt contain detailed error messages just error types.

When the user has no access to the log of the nats-server he can't check what exactly is going wrong.

Use case

The user needs access to the log of the nats-server to check what is going wrong.
However, he may not have access to it.

At my setup I use the nats auth callout and the clients authenticate with an oauth2 access token (from client credentials flow).

When the auth service returns an error (e.g. Access Token expired, Invalid Token, ..) via the auth callout response it gots logged inside the nats-server. But the Client only got the error type "AuthorizationViolation". So the client can't decide if he needs to fetch a new token or something other went wrong (e.g. missing permissions).

Contribution

No response

@eschmidt-WI eschmidt-WI added the proposal Enhancement idea or proposal label Nov 21, 2024
@Jarema
Copy link
Member

Jarema commented Nov 29, 2024

Hey.
First of all, you can always check source, even if the error is not explicitly nested. However, in this case, I'm afraid that that's all that server sends back - just Authorization Violation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

2 participants