microsoft / fabric-migration

Scripts and tooling to migrate DW and Spark workloads to Fabric.
MIT License
18 stars 7 forks source link

Handle other successful HTTP response codes, especially 202 when creating Fabric notebooks #15

Closed andrewluotechnologies closed 3 months ago

andrewluotechnologies commented 4 months ago

I did a Synapse -> Fabric migration recently and the script fails for me because the notebook create API returns 202 instead of 200 and the code is explicitly checking for 200. https://learn.microsoft.com/en-us/rest/api/fabric/articles/long-running-operation#item-creation-example documents that 200, 201, 202 can all be returned, so using response.ok handles all these cases (and any future successful response codes)