-
Notifications
You must be signed in to change notification settings - Fork 55
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
Make sure parsed body is an array when expecting Sequence #385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. Thanks for this PR. Getting this PR checked in will definitely help us achieve better availability. We are seeing dips in our service availability due to this issue. It would be really great to see this checked in sooner.
Any idea on what is the estimated time to complete this PR? Also can we get a point of contact person to reach out to in case of future inquiries?
@sasathy1 Can you share which package are you using where you are seeing the issues that would be solved with this PR? |
/azp run public.Azure.ms-rest-js - test dependent projects |
Azure Pipelines successfully started running 1 pipeline(s). |
We are using @azure/arm-eventhub and @azure/arm-servicebus(both are of version 3.2.0). |
/azp run public.Azure.ms-rest-js - test dependent projects |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-Authored-By: Ramya Rao <ramya.rao.a@outlook.com>
/azp run public.Azure.ms-rest-js - test dependent projects |
Azure Pipelines successfully started running 1 pipeline(s). |
Issue:
When an operation spec defines that a response should be of type Sequence (array) but the service actually returns null/undefined instead of an empty list, we end up crashing with the following error as the empty response body gets deserialized as {}
See Azure/azure-sdk-for-js/issues/8445
Note:
[...(_response.parsedBody || [])]
gets compiled into(_response.parsedBody || []).slice()
.Fix:
When we are expecting an array, make sure we have one before proceeding