Good afternoon,
We would like to propose that all API operations return ONLY HTTP code, since the applications that consume the API operations when writing in REST format expect an HTTP code in the response; it can be 200, 201, 404... etz.
We open this ticket because in some calls when we notify a site that does not exist is not returning a 552 error instead of a 404. In addition, in the 552 response in the message that is ad-hoc if it indicates that it is a 404... so it doesn't make much sense that we have to adapt the consumer applications to something not STANDARD.
Thank you for your attention.
Juanvi Ruiz.
We are going to have development to fix your "ad-hoc error". I am going to convey my descomfort with the rest of the company about the support you have. I hope you reflect on this.
Dear customer,
I will try to explain more in details the choice that lead us to current specification.
Let see more in details the call
GET /stores/{storeId}/labels/{labelId}
For the target store, it searches a label and return it.
2 elements could be not recognized or found by the platform: label or store.
/stores/{storeId} is a routing path, this is an essential element of the request. We had decided that any malfunction at this level should be managed in a specific way. This to avoid that client chooses between two 404. We think it is easier to choose between 552 (wrong configuration) and 404 (either label absent or wrong configuration).
/labels/{labelId} is the core of the request and a 404 should target that one to avoid any mistake.
552 is not a standard HTTP code, and we choose it especially to be sure it could not be seen as something else.
GET /stores/{storeId}/labels/{labelId}
404: no label
552: wrong configuration
You could disagree with that and we understand it, but we really think it is easier for everyone to have a simple error code for a wrong configuration.
Best Regards,
Emmanuelle
I am saddened to see that you do not give me a technical answer to the question I am asking. If you are a SaaS platform you should standardise all processes to avoid your customers having to do rework.
I don't understand how you can always return a standard code in all your operations and in this particular case you excuse yourselves by saying that you have decided to do so when even in the answer message you are returning the standard code that should return the call...
Dear customer,
Thank you very much for your request. Unfortunately, we have decided not to implement it.
On our side, error 552 means that the store does not exist. We are aware that this number is not common but we will keep it as this is a way for us to better understand the error.
If you have this error again, please check your store domain name.
Thank you,
BR,
Emmanuelle