Incorrect response codes returned by GET method of armmarketplaceorder.MarketplaceAgreementsClient #21286
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Marketplace Ordering
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Service
This issue points to a problem in the service.
Bug Report
Package dependencies and versions used:
I am currently using
armmarketplaceorder.MarketplaceAgreementsClient
to get the AgreementTerms for a combination ofOfferType
,PublisherID
,PlanID
andOfferID
and i have observed the following:Observation-1
If the OfferID is changed to a value which is not there then it returns the following response:
Expectation:
I was expecting a 404 Resource Not Found to be returned. A bad request is usually returned when the request is malformed or has an invalid value. Offer Types are strings which are persisted by the server when a client creates a Plan. From that perspective i would have assumed that if there was no agreement term for a combination of PlanID, OfferID, PublisherID and OfferType then it should have just returned a 404.
Observation-2
If
PlanID
is passed a value that does not exist it still returns the AgreementTerms with the correct PlanID. It seems that the value of PlanID has no impact on the response. If that is the case then why do you expect the consumer to pass this value?Observation-3
If
PlanID
is left blank then i get the following error:So as long as PlanID is any gibberish value and that is clubbed with correct values for the rest of parameters passed to
Get
method on the client then it will return the correct AgreementTerms. This is totally unexpected.Observation-4
If
PublisherID
is set incorrectly then we get the following response:Expectation:
I was expecting a 404 Resource Not Found to be returned. Same as the expectation for an non-existent PlanID. If you closely observe the message says OfferID
gardenlinux
not found which is weird as it does not talk about a non-existent PublisherID. There is no publisher IDsap1
and therefore all : the error code, http response code and the message are misleading.The text was updated successfully, but these errors were encountered: