Internal server error when uploading CI job artifacts
Summary
Setting an invalid expire_in
time results in an internal server error when uploading CI job artifacts.
Steps to reproduce
curl -X POST "${API_URL}/v4/jobs/${JOB_ID}/artifacts" \
--header "JOB-TOKEN: ${JOB_TOKEN}" \
-F "expire_in=invalid_value" \
-F "file=@archive.zip"
{"message":"500 Internal Server Error"}
What is the current bug behavior?
Request returns 500 Internal server error
What is the expected correct behavior?
Request returns 400 Bad request (invalid "expire_in" value)
Possible fixes
Add a sanity check before using the user provided value in runner.rb#L271.