-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Recovery Services API 2018-07-10 returns 400 rather than 404 when a Site Recovery Fabric cannot be found #12759
Comments
This is an API bug tracked in Azure/azure-rest-api-specs#12759
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Sharmistha-Rai. Issue DetailsUpon upgrading from API version 2018-01-10 to API version 2018-07-10 - we've noticed that the Site Recovery Fabric API returns a 400, rather than a 404 when a Fabric does not exist, for example:
Can this API be fixed to match the Swagger definition and most the convention amongst API's here? Thanks!
|
Hi @tombuildsstuff - thank you for bringing this to our attention. This looks like a bug. Let me check this with our team and confirm. |
Actually it appears this is also broken in |
We use the Resource ID, that you have also passed, to check for Fabric's existence. But it seems like the registration for the resource ID that you're passing is missing. As the registration is missing, we are not able to fetch the fabric itself and it was never checked. So, this 400 response which you received is for the missing registration. If the fabric is missing, then we continue to throw the error 404. This is not a bug, this is expected behavior. |
@Sharmistha-Rai if a resource doesn't exist (which in this case a missing registration for this resource against the Recovery Service Fabric would indicate) - then the ARM spec expects this to be a 404. This is the same when accessing children of parent items - if the parent doesn't exist then child endpoints/routes must return a 404. Whilst I can appreciate a 400 could be returned were this part of the payload (for example referencing another resource that doesn't exist in the HTTP Body) - a 404 must be returned since this issue is coming from the URI, as per the ARM spec afaik - as such I believe this is an API bug? It's worth noting introducing a 400 rather than a 404 as this was previously is a breaking change too? Thanks! |
@tombuildsstuff - We have decided to take up the work required for fixing this issue. We plan to release a fix in our upcoming update, so please look forward for a fix in our March release. It should be live in all geos by end of March. Please close this thread once you find some time. You can open in again once you have tested out the fix. |
@Sharmistha-Rai thanks for the update, that's great. Since this is an active API Bug, I'm going to leave this open until the issue is resolved though - but we'll close this once we can confirm this has been rolled out around the end of the month, as otherwise folks may believe this has been fixed (since the issues closed preemptively). Thanks! |
@Sharmistha-Rai Any update on this issue? |
Hi @jmeadowcroft - |
I came across this issue today, did this fix get pushed ? checking for presence of existing site recovery replication policy XXXXXXXX : siterecovery.ReplicationPoliciesClient#Get: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="The resource with ID 3917603715439329859 isn't registered with the service." Details=[{"activityId":"ab28e994-2ae0-9387-76ef-2f45d8744a10","clientRequestId":"e67f6cc8-4610-4c19-86fa-dc3016d43055","code":"SubscriptionIdNotRegisteredWithSrs","message":"The resource with ID 3917603715439329859 isn't registered with the service.","possibleCauses":"The operation failed due to an internal error.","recommendedAction":"Retry the last action. If the issue persists, contact Support."}] |
It appears on
|
ping @Sharmistha-Rai - any update here? |
Upon upgrading from API version 2018-01-10 to API version 2018-07-10 - we've noticed that the Site Recovery Fabric API returns a 400, rather than a 404 when a Fabric does not exist, for example:
Can this API be fixed to match the Swagger definition and most the convention amongst API's here?
Thanks!
The text was updated successfully, but these errors were encountered: