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

Follow Exception Handling Design Similar To Conductor #33

Open
jas34 opened this issue Jul 15, 2023 · 1 comment
Open

Follow Exception Handling Design Similar To Conductor #33

jas34 opened this issue Jul 15, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jas34
Copy link
Owner

jas34 commented Jul 15, 2023

While working on the PR with @vivianzheng404 on the PR - #32 we realised that we should opt for the exception handling design which is similar to conductor version v3.13.5. This ticket is being opened to implement after release-3.0.0.
Refer conversation - https://github.com/jas34/scheduledwf/pull/32/files#r1251737069

@jas34 jas34 added enhancement New feature or request help wanted Extra attention is needed labels Jul 15, 2023
@jas34 jas34 mentioned this issue Jul 15, 2023
@vivianzheng404
Copy link

vivianzheng404 commented Aug 12, 2023

2 more things about error handling

  • Add error handling when GET a non-exist scheduled workflow
    currently when GET a non-exist scheduled workflow on endpoint /api/scheduling/metadata/scheduleWf/{name}, the response is 200 OK. In the future I expect 404 error code, with response body similar to PUT a non-exist scheduled workflow, such as

{
"status": 404,
"message": "No such workflow found by id: 8666a0e4-e687-452a-b3f4-c6e090323474",
"instance": "vivianzheng-Mac",
"retryable": false
}

  • Change error code on endpoints
    Right now when PUT a non-exist scheduled workflow, the error code is 500. However, in the code, it should be 400 INVALID_INPUT. It looks like somehow in the error call stack 400 was overridden/bubbled up to be 500. We should test other error handling endpoints and make sure the error code is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants