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

API ServiceBusErrorSource to represent source of error #16710

Merged
merged 37 commits into from
Oct 30, 2020

Conversation

hemanttanwar
Copy link
Contributor

@hemanttanwar hemanttanwar commented Oct 22, 2020

Introduce ServiceBusErrorSource, to help user identify source of the error. Specially in error handler in processor model.

/**

  • Represent the scenario in which user was when the error happened.
    */
    public enum ServiceBusErrorSource {
    SEND,
    RECEIVE,
    APPEND,
    COMPLETE,
    DEFER,
    DEAD_LETTER,
    PEEK;
    }

Also removing unwanted opens statements from module info as they are not needed.

@ghost ghost added the Service Bus label Oct 22, 2020
@hemanttanwar hemanttanwar marked this pull request as ready for review October 27, 2020 08:20
.verifyErrorMatches(throwable -> {
Assertions.assertTrue(throwable instanceof ServiceBusAmqpException);
final ServiceBusErrorSource actual = ((ServiceBusAmqpException) throwable).getErrorSource();
Assertions.assertEquals(ServiceBusErrorSource.RECEIVE, actual);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also have tests for error source UNKNOWN?

Copy link
Member

@conniey conniey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@hemanttanwar hemanttanwar merged commit 249ecc1 into Azure:master Oct 30, 2020
@hemanttanwar hemanttanwar deleted the sb-t2-errorsource-api branch October 30, 2020 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants