Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to kill a task should not be an HTTP 500 error #8878

Open
belforte opened this issue Jan 10, 2025 · 0 comments
Open

trying to kill a task should not be an HTTP 500 error #8878

belforte opened this issue Jan 10, 2025 · 0 comments

Comments

@belforte
Copy link
Member

when client tries to kill a task which is not in a "killable" status, server should report e.g. HTTP 400 which will hopefully result in a better handling on client side, instead of making it look like a server error

belforte@lxplus807/TC3> crab kill -d crab_20250110_183756/
Fatal error trying to connect to https://cmsweb-test2.cern.ch:8443/crabserver/dev/workflow using workflow=250110_173801%3Abelforte_crab_20250110_183756.
exit code from curl = 0
HTTP code/reason = 500/Internal Server Error .  stdout:
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>500 Internal Server Error</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>500 Internal Server Error</h2>
        <p>Execution error</p>
        <pre id="traceback"></pre>
    <div id="powered_by">
      <span>
        Powered by <a href="http://www.cherrypy.dev">CherryPy 18.8.0</a>
      </span>
    </div>
    </body>
</html>

The server answered with an error.
Server answered with: Execution error
Reason is: You cannot kill a task if it is in the SUBMITFAILED status
Error Id: 1e5842978d65bd5fd7bb6d2d85dd65d3
belforte@lxplus807/TC3> 


@belforte belforte changed the title trying to kill a tas should not be an HTTP 500 error trying to kill a task should not be an HTTP 500 error Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants