bigcommerce / docs

The open source docs home for BigCommerce, including API specifications in OAS YAML and narrative docs in MDX
https://developer.bigcommerce.com
12 stars 31 forks source link

Feedback for “Customers” – Where's The Error Response Bodies? #581

Open sshaw opened 6 days ago

sshaw commented 6 days ago

https://developer.bigcommerce.com/docs/rest-management/customers

Response section has a 200 tab but nothing describing what an error response looks like.

Nothing here either: https://developer.bigcommerce.com/docs/start/about/status-codes

bc-traciporter commented 5 days ago

Hi @sshaw thank you for your feedback. We can add error responses to this endpoint. The link you added above contains descriptions for 200, 300, 400 and 500 status codes.

sshaw commented 5 days ago

The link you added above contains descriptions for 200, 300, 400 and 500 status codes.

I meant that this link does not describe error response bodies

bc-traciporter commented 4 days ago

Hi @sshaw There are descriptions for all the 400 codes, which are error codes. Can you be more specific regarding what you would like to see?

I did add 422 error codes to the Customer reference documentation. https://developer.bigcommerce.com/docs/rest-management/customers#get-all-customers https://developer.bigcommerce.com/docs/rest-management/customers#delete-customers

bc-traciporter commented 3 days ago

Closing this issue, if you have additional feedback I can reopen the issue.

sshaw commented 3 days ago

There are descriptions for all the 400 codes, which are error codes. Can you be more specific regarding what you would like to see?

Response body for errors responses. Status codes are shown but response bodies are not. Some customer endpoint docs show response bodies for errors but others do not. In the case of customers v3 no error response bodies are shown but they can be returned. For example:

 /stores/ID/v3/customers/addresses?x=1

Will result in:

{"status"=>422,
 "title"=>"The filter(s): x are not valid filter parameter(s).",
 "type"=>
  "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
 "errors"=>{}}

This is not described anywhere outside of "we can return a 422".

bc-traciporter commented 2 days ago

Hi @sshaw okay, I understand. You are requesting not only descriptions but response bodies in the HTTP status code article. I will relay your message. Thank you