JOC - JobScheduler Operations Center
  1. JOC - JobScheduler Operations Center
  2. JOC-476

Errors during display or download of logs should be visible

    Details

      Description

      Current Situation

      • If a log window is opened then in this window the JOC api to get the log is called.
        If this api call has an error (e.g. the history entry with the current log doesn't exist or the session has expired) then the log windows display only a null instead of the error message although the response has a HTTP code != 200 and an error message.
      • Should the log be downloaded then nothing happens.
      • The errors are only logged in the JOC log.

      Desired behavior

      • Displaying log in a window
        • The HTTP code has to be considered.
        • With HTTP 200 the log is in the response as text/plain which can be displayed in the window as usual.
        • With HTTP 401, 403, 420, 434 and 440 a JOC error is in the body as application/json where the "code" and the "message" should displayed in the window.
        • For all further HTTP codes the code and the HTTP status message should displayed in the window.
      • Downloading log
        • First the corresponding ./info api should called
        • The HTTP code has to be considered.
        • With HTTP 200 the ./download api can be called with the "filename" parameter from the ./info response.
        • With HTTP 401, 403, 420, 434 and 440 a JOC error is in the body as application/json where the "code" and the "message" should displayed in an alert similiar to other errornous api calls.
          The ./download api is not called.
        • For all further HTTP codes the code and the HTTP status message should displayed in an alert similiar to other errornous api calls.
          The ./download api is not called.

        Issue Links

          Activity

          Hide
          Oliver Haufe added a comment -

          Hi Sourabh Agrawal,
          Error message in the log window looks nice

          When I click for download then the error is not alerted.
          I know that the download api is called in an iframe so that it is very hard to collect the http code and the body with the error.
          That was the reason why I suggest to call first the corresponding ./info api.

          Best regards
          Oliver

          Show
          Oliver Haufe added a comment - Hi Sourabh Agrawal , Error message in the log window looks nice When I click for download then the error is not alerted. I know that the download api is called in an iframe so that it is very hard to collect the http code and the body with the error. That was the reason why I suggest to call first the corresponding ./info api. Best regards Oliver

            People

            • Assignee:
              Sourabh Agrawal
              Reporter:
              Oliver Haufe
              Approver:
              Oliver Haufe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: