Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42920

Developer should see error message for failed input step

    • Blue Ocean 1.0-rc3, Blue Ocean 1.1, Blue Ocean 1.1, Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2, Blue Ocean 1.3, Blue Ocean 1.4 - beta 1, Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2, Blue Ocean 1.4 - beta 5

      Context
      If a input step cannot proceed when approving input an error message is returned from the API but not displayed to the user.

      Scope
      Show a form error message if we cannot proceed the input.

      Example

      Jenkinsfile

      node {
          echo 'hello world'
          input message: "Do you want to approve this job to deploy to production?", ok: "OK", submitter: "admin, B, C"
      }
      

      Response

      {
        "message" : "You need to be admin, B, C to submit this",
        "code" : 400,
        "errors" : [ ]
      }
      

          [JENKINS-42920] Developer should see error message for failed input step

          Michael Neale added a comment -

          Hey Ivan - could be a quick win (but not strictly critical for 1.0)

          Michael Neale added a comment - Hey Ivan - could be a quick win (but not strictly critical for 1.0)

          Michael Neale added a comment -

          Perhaps we should have a general error handler? 

           

          Or in this case it is specific enough around permissions we want it specific to this screen. 

          Michael Neale added a comment - Perhaps we should have a general error handler?    Or in this case it is specific enough around permissions we want it specific to this screen. 

          James Dumay added a comment -

          Can we do a generic catch all for errors? Displaying the log would be fine in this case.

          James Dumay added a comment - Can we do a generic catch all for errors? Displaying the log would be fine in this case.

          Karl Shultz added a comment -

          Testing Notes:

          • Depends on final implementation.
          • If we take the approach of making this specific to job permissions, tests should be created which verify the correct message is presented at the correct time

          Karl Shultz added a comment - Testing Notes: Depends on final implementation. If we take the approach of making this specific to job permissions, tests should be created which verify the correct message is presented at the correct time

          James Dumay added a comment -

          nicu it might be worth grabbing imeredith for a quick hangout to discuss what to do about this one.

          imeredith if the input proceed fails, we should get a error back in the JSON with why the input could not be submitted. At the moment it looks like the Input plugin is redirecting to some classic page, so the AJAX response is HTML.

          James Dumay added a comment - nicu it might be worth grabbing imeredith for a quick hangout to discuss what to do about this one. imeredith if the input proceed fails, we should get a error back in the JSON with why the input could not be submitted. At the moment it looks like the Input plugin is redirecting to some classic page, so the AJAX response is HTML.

            nicu Nicolae Pascu
            jamesdumay James Dumay
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: