Machine readable error message in a 403 Forbidden response
Problem description:
When we are getting a 403 Forbidden response, we only have the error message to go on about what the actual issue is. This can be an invalid rate plan or Mews being busy for a minute.
As documented (https://mews-systems.gitbook.io/connector-api/guidelines/responses#response-codes), these error messages are translated in the client language, so these can be displayed to the end user.
For example the 403 Forbidden response on /rates/updatePrice can be this:
{
"Message": "Une autre opération est en cours. Veuillez réessayer dans quelques secondes.",
"DebugDetails": null,
"Details": null
}
This message contains no machine readable information about the error. The message above is a French 'please try again later', but a 403 response can contain any random error message in any language.
As the message above is a soft fail (try again later), and other error message might be a hard fail, these responses might be handler differently in the connecting application. In this case we want to do an automatic retry in a minute, but with a hard fail me might need to handle the error differently.
There is no method in place to distinguish error message other than to parse the translated error string, which is undoable.
Proposed solution:
It would be nice if there could be some technical error message or error code added to the response, so we can use that instead of the end user error message. Something machine readable.