Project

General

Profile

Actions

Bug #4383

closed

Need to provide users with more details on failures or errors that occur when executing a command.

Added by Brad Buckingham about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Unless I am mistaken, there is not currently a way to provide users with details on the true failure of a command.

For example, when a developer creates a new command, they have the ability to provide something like the following:

failure_message "Could not update the filter rule"

Unfortunately, this doesn't give enough detail to the user to address the failure. More information is, however, typically available in the response received from the server. If possible, we should expose some of those details to the user.

For example, the response from the server, might be:
Completed 422 Unprocessable Entity in 685.1ms (Views: 0.8ms | ActiveRecord: 152.3ms)
With body: {"displayMessage":"Validation failed: Invalid filter rule specified, 'version' cannot be specified in the same tuple as 'min_version' or 'max_version'","errors":{"base":["Invalid filter rule specified, 'version' cannot be specified in the same tuple as 'min_version' or 'max_version'"]}}


Related issues 1 (0 open1 closed)

Related to Katello - Bug #4504: hammer-cli-katello needs own exception handlerClosedTomáš Strachota02/28/2014Actions
Actions #1

Updated by Tomáš Strachota about 10 years ago

Brad, this is already possible. Katello plugin is only missing it's own exception handler. I've added it in this commit
https://github.com/tstrachota/hammer-cli-katello/commit/606ed21867751d7c9cf9fdb518ca39f89f03fc50
but it still waits in a PR.

There's a bit more on exception handlers here https://github.com/theforeman/hammer-cli/blob/master/doc/creating_commands.md#exception-handling

Let me know if you have more questions.

Actions #2

Updated by Tomáš Strachota about 10 years ago

  • Related to Bug #4504: hammer-cli-katello needs own exception handler added
Actions #3

Updated by Tomáš Strachota about 10 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF