Skip to content

[azservicebus] Adding azservicebus.Error to represent errors that a customer can use programatically.#17786

Merged
richardpark-msft merged 10 commits intoAzure:mainfrom
richardpark-msft:sb-structured-error
May 5, 2022
Merged

[azservicebus] Adding azservicebus.Error to represent errors that a customer can use programatically.#17786
richardpark-msft merged 10 commits intoAzure:mainfrom
richardpark-msft:sb-structured-error

Conversation

@richardpark-msft
Copy link
Copy Markdown
Member

@richardpark-msft richardpark-msft commented Apr 30, 2022

Created azservicebus.Error to represent errors that a customer can use programatically.

azservicebus.Error contains a code that customers can use, which is considered stable and part of the supported API.

Today we only have two codes - CodeLockLost, which comes back if the lock has expired and CodeConnectionLost, which comes back if we failed on an error that is retryable.

Fixes #17283

@richardpark-msft richardpark-msft changed the title [azservicebus] Draft for user-exposed errors [azservicebus] Adding azservicebus.Error to represent errors that a customer can use programatically. May 2, 2022
@richardpark-msft richardpark-msft marked this pull request as ready for review May 2, 2022 22:26
@richardpark-msft
Copy link
Copy Markdown
Member Author

/azp run go - azservicebus

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft richardpark-msft requested a review from chlowell May 3, 2022 20:00
Comment thread sdk/messaging/azservicebus/error.go Outdated
Comment thread sdk/messaging/azservicebus/internal/exported/error.go Outdated
Comment thread sdk/messaging/azservicebus/internal/exported/error.go Outdated
Comment thread sdk/messaging/azservicebus/internal/errors.go Outdated
Comment thread sdk/messaging/azservicebus/error.go
Comment thread sdk/messaging/azservicebus/internal/exported/error.go
Comment thread sdk/messaging/azservicebus/receiver_test.go
Comment thread sdk/messaging/azservicebus/receiver_unit_test.go Outdated
Comment thread sdk/messaging/azservicebus/sender_unit_test.go Outdated
Comment thread sdk/messaging/azservicebus/internal/exported/error.go Outdated
richardpark-msft and others added 2 commits May 3, 2022 17:11
Co-authored-by: Charles Lowell <10964656+chlowell@users.noreply.github.com>
Comment thread sdk/messaging/azservicebus/internal/exported/error.go
@richardpark-msft
Copy link
Copy Markdown
Member Author

/azp run go - azservicebus

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft
Copy link
Copy Markdown
Member Author

/azp run go - azservicebus

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread sdk/messaging/azservicebus/client.go Outdated
Comment thread sdk/messaging/azservicebus/example_receiver_test.go Outdated
Comment thread sdk/messaging/azservicebus/internal/exported/error.go Outdated
Comment thread sdk/messaging/azservicebus/internal/exported/error.go Outdated
Comment thread sdk/messaging/azservicebus/receiver.go
- Return *azservicebus.Error, not an azservicebus.Error.
Comment thread sdk/messaging/azservicebus/internal/exported/error.go Outdated
- Adding in a test for two cases that weren't covered for whatever reason.
@richardpark-msft
Copy link
Copy Markdown
Member Author

/azp run go - azservicebus

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft richardpark-msft enabled auto-merge (squash) May 5, 2022 20:40
@richardpark-msft richardpark-msft merged commit e425c37 into Azure:main May 5, 2022
@richardpark-msft richardpark-msft deleted the sb-structured-error branch May 5, 2022 20:56
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 this pull request may close these issues.

[azservicebus] Provide a Service Bus error type that customers can use for actionable errors.

3 participants