-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[service-bus] Updating receiveMessagesStreaming sample to showcase proper error handling #12111
Merged
richardpark-msft
merged 18 commits into
Azure:master
from
richardpark-msft:richardpark-sb-foreverloop
Oct 29, 2020
Merged
[service-bus] Updating receiveMessagesStreaming sample to showcase proper error handling #12111
richardpark-msft
merged 18 commits into
Azure:master
from
richardpark-msft:richardpark-sb-foreverloop
Oct 29, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Syncing the javascript and typescript samples so they have 99% of the same formatting to make the next sync easier.
1. Make it so you can narrow the type ofr 'code' so you can get useful autocomplete information. By default `isMessagingError` (which is new to this release) returns MessagingError's that are strictly typed (with an option to get the more loosely typed version that takes a 'string' for the .code field). MessagingError itself (when no type parameter is specified) defaults to what it was previously - just a string. So this change should be backwards compatible. 2. I've added in proper doc comments for the various error codes and alphabetized them. There's a _lot_ but at least this makes it easier to scan and find the one you want. Our samples in ServiceBus will clarify which of these codes are likely to be relevant for most users.
…nd the underlying defined string union as well.
- api file needed updating since I rearranged the members of the string union.
sdk/servicebus/service-bus/samples/javascript/advanced/processMessageFromDLQ.js
Show resolved
Hide resolved
@HarshaNalluru , @ramya-rao-a - JavaScript receiveStreamingMessages sample to come after we finish reviewing the typescript version. (also, still testing but wanted to see if the structure of the sample made sense). |
ramya-rao-a
reviewed
Oct 28, 2020
sdk/servicebus/service-bus/samples/javascript/advanced/deferral.js
Outdated
Show resolved
Hide resolved
ramya-rao-a
reviewed
Oct 28, 2020
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
ramya-rao-a
reviewed
Oct 28, 2020
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
ramya-rao-a
reviewed
Oct 28, 2020
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
ramya-rao-a
reviewed
Oct 28, 2020
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
- Adding in missing import for javascript
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Outdated
Show resolved
Hide resolved
…t here makes it so we can `npm run build:samples` properly.
…gesStreaming.ts Co-authored-by: Harsha Nalluru <[email protected]>
…rdpark-msft/azure-sdk-for-js into richardpark-sb-foreverloop
sdk/servicebus/service-bus/samples/typescript/src/receiveMessagesStreaming.ts
Show resolved
Hide resolved
HarshaNalluru
approved these changes
Oct 29, 2020
Adding in some more comment text to illustrate where you can turn off autocomplete.
ramya-rao-a
reviewed
Oct 29, 2020
sdk/servicebus/service-bus/samples/javascript/receiveMessagesStreaming.js
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/javascript/receiveMessagesStreaming.js
Outdated
Show resolved
Hide resolved
…treaming.js Co-authored-by: Ramya Rao <[email protected]>
…treaming.js Co-authored-by: Ramya Rao <[email protected]>
ramya-rao-a
approved these changes
Oct 29, 2020
/azp run js - core - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of our changes to make the subscribe() internals more robust (and more forgiving of errors) we need to update our sample.
The sample should now show how to handle errors, since we've now returned control to the user as to what is considered fatal.
Some other changes:
Fixes #12051, #8653, #7905