Luiz Capitulino wrote:
On Mon, 7 Dec 2009 21:37:16 +0100
Markus Armbruster <arm...@redhat.com> wrote:
-{ "error": { "class": json-string, "data": json-value }, "id": json-value }
+{ "error": { "class": json-string, "data": json-value, "desc": json-string },
+ "id": json-value }
Where,
- The "class" member contains the error class name (eg. "ServiceUnavailable")
- The "data" member contains specific error data and is defined in a
per-command basis, it will be an empty json-object if the error has no data
+- The "desc" member is a human-readable error message. Clients should
+ not attempt to parse this message.
- The "id" member contains the transaction identification associated with
the command execution (if issued by the Client)
As we've talked on irc, I don't agree with this change.
Basically, adding 'desc' to the standard error message introduces all
the problems we've discussed about free-form English strings.
It's not free form English. The 'desc' string is always autogenerated
based on the error object.
It's completely redundant information because you can already generate
that string, but it simplifies client creation because a lazy client
does not have to include the conversion table if they only care about
English error output.
Regards,
Anthony Liguori