Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9389

Improve error message when cancelling job in state canceled via REST API

    XMLWordPrintableJSON

Details

    Description

      • Request job that has been already cancelled
        $ curl http://localhost:8081/jobs/b577a914ecdf710d4b93a84105dea0c9
        {"jid":"b577a914ecdf710d4b93a84105dea0c9","name":"CarTopSpeedWindowingExample","isStoppable":false,"state":"CANCELED", ...omitted...}
        
      • Cancel job again
        $ curl -XPATCH http://localhost:8081/jobs/b577a914ecdf710d4b93a84105dea0c9\?mode\=cancel
        {"errors":["Job could not be found."]} (HTTP 404)
        

      Since the actual job resource still exists, I think status code 404 is confusing. I think a better message should indicate that the job is already in state CANCELED.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              uce Ufuk Celebi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: