Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-4992

Unclear error message when configuration is unsuccessful

    XMLWordPrintable

Details

    Description

      For example when adding a nonexistent subhandler to an async handler, the error looks like:

      Failed to modify resource [ ("subsystem" => "logging"), ("async-handler" => "ERROR_QS_ASYNC") ]
      
      Unexpected HTTP response: 500
      
      Request
      {
          "operation" => "composite",
          "address" => [],
          "steps" => [{
              "address" => [
                  ("subsystem" => "logging"),
                  ("async-handler" => "ERROR_QS_ASYNC")
              ],
              "operation" => "write-attribute",
              "name" => "subhandlers",
              "value" => ["abc"]
          }]
      }
      
      Response
      
      Internal Server Error
      {
          "outcome" => "failed",
          "result" => {"step-1" => {
              "outcome" => "failed",
              "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException: Handler \"abc\" is not found",
              "rolled-back" => true
          }},
          "failure-description" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException: Handler \"abc\" is not found"}},
          "rolled-back" => true,
          "response-headers" => {"process-state" => "reload-required"}
      }
      

      In this case only one attribute has changed and the fact that the subhandler does not exist is hidden in the error message.

      CLI output on the same operation:

      [standalone@localhost:9990 /] /subsystem=logging/async-handler=async-test:write-attribute(name=subhandlers,value=[abc])
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException: Handler \"abc\" is not found",
          "rolled-back" => true
      }
      

      I would suggest to add the failure description to the top of the error message. The Failed to modify resource [ ("subsystem" => "logging"), ("async-handler" => "ERROR_QS_ASYNC") ] part is not as important as Operation handler failed: java.lang.IllegalArgumentException: Handler \"abc\" is not found.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nziakova@redhat.com Nikoleta Ziakova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: