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

API endpoint /v4/reloadtask/<taskId>/start not handling empty PUT bodies well #157

Closed
mountaindude opened this issue Apr 15, 2021 · 0 comments

Comments

@mountaindude
Copy link
Collaborator

mountaindude commented Apr 15, 2021

Describe the bug
Butler throws an error when calling this API with an empty JSON body.
Passing in an empty array [] works.

To Reproduce

curl -X "POST" "http://butler-host:8080/v4/reloadtask/cd3f1f3b-affa-4da5-b678-57b538e944d0/start" \
     -H 'X-HTTP-Method-Override: PUT' \
     -H 'content-type: application/json' \
     -H 'accept: application/json' \
     -d $'{}'

results in error.

Expected behavior
The API should be tolerant to an empty body or an empty array.

@mountaindude mountaindude added this to the 5.4 milestone Apr 15, 2021
@mountaindude mountaindude moved this from To do to In progress in Butler general development Apr 22, 2021
@mountaindude mountaindude moved this from In progress to Done in Butler general development Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant