Closed ironfroggy closed 4 years ago
Secondly, if no hash is provided at all, there is no error, although the OpenAPI spec defines the sha256 parameter as required.
Yeah, it is really optional. Updating spec.
@ironfroggy
The error response body when a hash is invalid is incorrect
Ah, that it is "pulp" style:
{
"status": "400",
"code": "invalid",
"title": "Invalid input.",
"detail": "The provided sha256 value does not match the sha256 of the uploaded file."
}
and not "galaxy_ns/autohub/galaxy-api" style:
{
"errors": [
{
"code": "invalid",
"detail": "The provided sha256 value does not match the sha256 of the uploaded file.",
"title": "Invalid Input",
"status": "400",
}
]
}
Sounds like something is amiss when the galaxy_pulp / pulp error gets transmogrified to galaxy_ng errors.
Two tests still fail for
sha256
handling on artifact upload:Here is the response when the hash does not match the uploaded artifact:
Notably, the
'parameter'
field is missing.Secondly, if no hash is provided at all, there is no error, although the OpenAPI spec defines the
sha256
parameter asrequired
. Either the spec could be adjusted if we want to leave it optional (as it is in Pulp) or we need to hand back arequired
code error body.