How can I distinguish different response errors without and error code?

Asked by Livio Brunner on 2018-08-09

In my application I do not want to directly forward the error messages from the Openstack API to the user, but I still need to distinguish whether for example "Quota exceeded for ram..." or "Quota exceeded for network..".

As far as I know the API does not send an unique identifier for each error message, so it will be hard to check what actually failed. The remoteMessage can't be taken as identifier too, because some messages are variable (e.g. "Quota exceeded for ram: Requested 8196, but already used 11268 of 15360 ram" -> The numbers are variable).

Is there a way around it, or is this a bug?

Btw., Google Map API for example solved this problem with unique error codes:

https://developers.google.com/maps/documentation/javascript/error-messages#errorcodes

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu nova Edit question
Assignee:
No assignee Edit question
Last query:
2018-08-09
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Livio Brunner for more information if necessary.

To post a message you must log in.