Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.

Repository from Github https://github.comAzure/azure-sdk-for-jsRepository from Github https://github.comAzure/azure-sdk-for-js

core: audit abort listeners and bubble up `reason`

xupeng543210 opened this issue · comments

if (event.type === "abort") {
// add reason here? abortController.abort("some reason");
abortController.abort();
}

Image

Hiya @xupeng543210 - thanks for reaching out! That's a good question. We certainly can add a reason; however, I am not sure we have any relevant reason to add - we could add a generic message but I don't think the Event payload we get to the abortListener defined in fetchHttpClient provides any meaningful information according to the docs

We may be able to fetch the abortSignal of the request and pass along its reason, but I don't know if that would be helpful / accurate and will need to investigate a bit.

If we were to add a generic message here, what information would you find valuable? We may be able to do better and would love your input!

uh, @maorleger , I found there is a reason passed in the event which is the user passed in, it should be accurate I think. Hope this is helpful

Image

Image

uh, @maorleger , I found there is a reason passed in the event which is the user passed in, it should be accurate I think. Hope this is helpful

Image

Image

Yeah that's super helpful - thank you! This should be doable and will improve the experience for sure, appreciate the suggestion!

Just to set expectations, I plan to tackle this in April and ship it in May hopefully. Thanks!