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.
MIT License
2.03k stars 1.19k forks source link

[Recorder] tests in maps-timezone SDK fail in record mode #30997

Closed HarshaNalluru closed 5 days ago

HarshaNalluru commented 1 week ago

Error from the service in record mode

 status: '400',
 body: {
    error: {
      code: '400 BadRequest',
      message: 'An API version was specified multiple times with different values'
    }
 }

live vs record modes image

To repro

github-actions[bot] commented 1 week ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @dnssuppgithub.

scbedd commented 1 week ago

I debugged into this issue. This is what the URL looks like when we send it causing the 400

https://atlas.microsoft.com/timezone/byId/json?query=America%2FNew_York&api-version=1.0/timezone/byId/json?query=America%2FNew_York&api-version=1.0

For some reason, the provided upstream HOST Uri includes the full URL:

image

This is supposed to just be the hostname. Not full URI.

It is this combination of full URI + original request URI that is causing the 400 from upstream.

HarshaNalluru commented 5 days ago

Thanks for the valuable inputs @scbedd, really helped my investigation. I have figured the problem, turned out they were depending on a very old recorder version which has the bug.

I have tested after upgrading to the new recorder and I do not see the problem anymore. ✅