debian-forge-composer/internal
Thomas Lavocat cfc91a3eb6 CloudAPI: Invalid package set returns 400
Previously a bad error code was returned, fixes #1477.

Testing:

I have two test cases to test the solution. The first is a request that
makes depsolve crash by changing the dnf-json script by an almost empty
one that only throws an exception. The second one fails because it
requests a non existing package. The former ends with a 500 error and
the later with a 400.

----8<-----

HTTP/1.1 500 Internal Server Error

Failed to depsolve base packages for ami/x86_64/centos-8: ailed to
depsolve base packages for ami/x86_64/centos-8: unexpected end of JSON
input

----8<-----

HTTP/1.1 400 Bad Request

Content-Length: 226Failed to depsolve base packages for
ami/x86_64/centos-8: DNF error occured: MarkingErrors: Error occurred
when marking packages for installation: Problems in request:
missing packages: jesuisunpaquetquinexistepas_idonotexist
2021-07-21 16:21:15 +02:00
..
blueprint weldr: Add distro field to blueprints 2021-07-12 08:58:42 +02:00
boot upload/aws: add support for session tokens 2021-06-28 13:14:19 +03:00
client Add 2nd distribution to the NewTestAPI function 2021-07-12 08:58:42 +02:00
cloud/gcp test/api.sh: randomize used GCP zone from the region 2021-07-16 10:14:30 +02:00
cloudapi CloudAPI: Invalid package set returns 400 2021-07-21 16:21:15 +02:00
common Move isStringInSlice to common.IsStringInSlice 2021-07-12 08:58:42 +02:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk osbuild: rename package to osbuild1 2021-03-17 18:12:17 +00:00
distro distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
distroregistry distro: drop Fedora 32 2021-07-05 11:16:08 +02:00
jobqueue worker: Introduce heartbeats 2021-07-08 21:14:38 +01:00
jsondb jsondb: Allow passing nil as document to Read() 2020-05-13 16:45:09 +02:00
kojiapi worker: Move job tokens to the queue itself 2021-07-08 21:14:38 +01:00
mocks worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
osbuild1 osbuild1: convert stage metadata from v2 2021-06-29 09:33:05 +01:00
osbuild2 osbuild2: use type aliases for unexported types to prevent recursion 2021-07-19 21:37:15 +02:00
ostree ostree: add test for VerifyRef() 2021-06-18 14:02:09 +01:00
reporegistry reporegistry: Add a DistroHasRepos helper function 2021-07-12 08:58:42 +02:00
rpmmd rhel85: distro and arch package sets 2021-07-01 12:48:32 +02:00
store api_test: Test compose with 2nd distribution 2021-07-12 08:58:42 +02:00
target New upload target: AWS S3 2021-06-18 14:02:09 +01:00
test worker: Add identity filter and client oauth support 2021-06-17 10:08:35 +02:00
upload spec: drop hacks for Fedora 32 2021-07-05 11:16:08 +02:00
weldr weldr: Filter the list of supported distributions 2021-07-12 08:58:42 +02:00
worker worker: Introduce heartbeats 2021-07-08 21:14:38 +01:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00