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

Authentication Errors swallowed and never surfaced to places where you could handle the error #292

Open
bmcadams-datastax opened this issue Aug 22, 2023 · 1 comment · May be fixed by #321

Comments

@bmcadams-datastax
Copy link

When authenticating with the Pulsar builder, if authentication fails the library does log an internal error like:
[2023-08-22T18:36:09Z ERROR pulsar::connection] connection error, not retryable: [PulsarError(Some(AuthenticationError), Some("Failed to authenticate"))]
However, that AuthenticationError gets dropped on the floor and never passed out to the code calling the library. Instead, you get Connection(Io(Custom { kind: Other, error: "fatal error when connecting to the Pulsar server" })).

My code right now is identical to the producer example code, but i'm deliberately passing bad authentication info.

This isn't terribly useful for a developer using the library who wants to know that the reason for failure was Auth, and be able to handle it in their code.

My current use case is a command line tool that actually verifies a pulsar config, and needs to know that the error that occurred was because Auth failed.

@bmcadams-datastax
Copy link
Author

Notably, a Topic Not Being found bubbles up properly…

[2023-08-22T18:56:32Z ERROR pulsar::retry_op] TopicProducer::create(persistent://metrics-test/default/astra-metrics-OMG) error: PulsarError(Some(TopicNotFound), Some("Topic Not Found."))
[2023-08-22T18:56:32Z DEBUG vector_config_tester::pulsar] Handling Connection Error PulsarError(Some(TopicNotFound), Some("Topic Not Found."))
[2023-08-22T18:56:32Z ERROR vector_config_tester::pulsar] Pulsar: Fell through to default on ConnectionError PulsarError(Some(TopicNotFound), Some("Topic Not Found."))

@rkrishn7 rkrishn7 linked a pull request Aug 12, 2024 that will close this issue
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 a pull request may close this issue.

1 participant