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

[Event Hubs] Include inner exception output for EventHubsException.ToString() #33009

Closed
dperez83 opened this issue Dec 12, 2022 · 1 comment · Fixed by #33014
Closed

[Event Hubs] Include inner exception output for EventHubsException.ToString() #33009

dperez83 opened this issue Dec 12, 2022 · 1 comment · Fixed by #33014
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs feature-request This issue requires a new behavior in the product in order be resolved. good first issue This issue tracks work that may be a good starting point for a first-time contributor help wanted This issue is tracking work for which community contributions would be welcomed and appreciated
Milestone

Comments

@dperez83
Copy link

Library name and version

Azure.Messaging.EventHubs.Processor 5.7.5

Describe the bug

Azure.Messaging.EventHubs EventHubsException.ToString() overrides the default System.Exception.ToString() and does not outputs the InnerException details.

Expected behavior

To output the InnerException details.

Actual behavior

Only this is output, and no InnerException detail.

Azure.Messaging.EventHubs.EventHubsException(GeneralError): An error was encountered while executing developer-provided code to process events. On most hosts, this will fault the task responsible for partition processing, causing it to be restarted from the last checkpoint. On some hosts, it may crash the process. It is very strongly advised that all developer-provided code include a try/catch wrapper and ensure that no exceptions are allowed to propagate up the stack. Exception details can be found in the inner exception. (vdqgadeviothub). For troubleshooting information, see https://aka.ms/azsdk/net/eventhubs/exceptions/troubleshoot

Reproduction Steps

Throw a Azure.Messaging.EventHubs EventHubsException with an InnerException

Environment

.NET 6.0

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 12, 2022
@jsquire jsquire added Event Hubs Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved. labels Dec 12, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 12, 2022
@jsquire jsquire added this to the Backlog milestone Dec 12, 2022
@jsquire jsquire added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. help wanted This issue is tracking work for which community contributions would be welcomed and appreciated good first issue This issue tracks work that may be a good starting point for a first-time contributor labels Dec 12, 2022
@jsquire jsquire moved this to Planned in Azure SDK for Event Hubs Dec 12, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 12, 2022
@jsquire jsquire changed the title [BUG] Azure.Messaging.EventHubs EventHubsException.ToString() does not outputs the innerException. [Event Hubs] Include inner exception output for EventHubsException.ToString() Dec 12, 2022
@jsquire
Copy link
Member

jsquire commented Dec 12, 2022

Hi @dperez83. Thank you for your feedback. I agree that we should be emulating the base exception behavior and including the inner exception, if it exists. I've added this to our backlog.

One thing that I'd like to mention is that if you are seeing this exception, it's a sign that your event processing handler is not following the recommended guidance. We strongly recommend that you ensure that your code for any of the processor handlers be wrapped in a try/catch block and ensure that no exceptions leak. More context can be found in: Exceptions in handlers.

@jsquire jsquire removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Dec 12, 2022
@jsquire jsquire self-assigned this Dec 12, 2022
@jsquire jsquire modified the milestones: Backlog, 2023-02 Dec 12, 2022
@jsquire jsquire linked a pull request Dec 13, 2022 that will close this issue
Repository owner moved this from Planned to Done in Azure SDK for Event Hubs Dec 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs feature-request This issue requires a new behavior in the product in order be resolved. good first issue This issue tracks work that may be a good starting point for a first-time contributor help wanted This issue is tracking work for which community contributions would be welcomed and appreciated
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants