@azure/identity setting global axios defaults #13343
Labels
Azure.Identity
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Milestone
@azure/identity
1.2.2
12.20.0
Describe the bug
Use of this package seems to be overriding global axios defaults in consuming code
axios.defaults.validateStatus = () => true
is being set in https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/src/client/msalClient.ts#L165. This is set on the global axios instance thus affecting axios calls in our own code, changing the default axios behaviour on error responsesTo Reproduce
Steps to reproduce the behavior:
Expected behavior
Use of this package should not override global axios settings in consuming code
Additional context
Suggested fix is to use a custom axios instance in
msalClient
and set defaults on that rather than the global instanceThe text was updated successfully, but these errors were encountered: