Azure / Azure/azure-rest-api-specs

Recovery Services API 2018-07-10 returns 400 rather than 404 when a Site Recovery Fabric cannot be found

Open
#12,759 12 comments 0 reactions 0 assignees View on GitHub
Recovery Services Site-Recovery Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

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:

> siterecovery.ReplicationFabricsClient#Get: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="The resource with ID 2195638768288125375 isn't registered with the service." Details=[{"activityId":"689647ac-7f72-7f8b-e344-93183a09e18a","clientRequestId":"6cac2a93-9f39-48f7-abb8-a62785eeaf97","code":"SubscriptionIdNotRegisteredWithSrs","message":"The resource with ID 2195638768288125375 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."}]

Can this API be fixed to match the Swagger definition and most the convention amongst API's here?

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the Site Recovery Fabric operation represented by siterecovery.ReplicationFabricsClient#Get and compare the 2018-07-10 specification with the reported response and Swagger definition. Confirm which response is documented for a missing Fabric; done when the specification and API behavior consistently represent that case as 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.