[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Client_result vs client_error



Forwarding this to everyone for familiarity

https://bugzilla.redhat.com/show_bug.cgi?id=981780 talks about client_error not being displayed.  Dan explained to me what the original intent was:

  client_result is returned to the client via the REST API on success, and on error IF no client_error was sent.  "on error" means exit code non-zero
  client_error if specified during a script execution that fails (returns non-zero exit) REPLACES all client_results in what is returned to the user
  client_message if specified, is ALWAYS returned to the client and the client should ALWAYS show it

Our current severity levels in the REST API should be:

  debug
  info
  result
  warning
  error

The CLI will not display messages of "debug" or "info" unless the user passes -d.

We need to check that the behavior of the node, broker, and UI matches the following:

* When client_message is received by the broker, it should be added to the messages array returned to the client at severity "warning" and field "nil".
* On a successful operation, the combined client_result's for a cartridge should be returned as a single message with severity "result" and field "nil" (in API > 1.5)
* On a failed operation, the broker should return EITHER the combined client_errors for a cartridge as a single message with severity "error" and field "nil", OR it should return the combined client_results as a single message with severity "error" and field "nil".  It should not return both at the same time.

Any bugs we have open should probably be checked to verify that this is what a) the cartridges are doing, b) what the broker is doing, and I'll check the UI to verify that it is doing that as well.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]