When deposit is rejected there are a few reasons it can happen:
- wrong domain (mismatch between url domain and client domain)
- missing metadatas
- missing content
When deposit is rejected there are a few reasons it can happen:
Status | Assigned | Task | ||
---|---|---|---|---|
Migrated | gitlab-migration | T1011 Enable continuous monitoring of deposit | ||
Migrated | gitlab-migration | T992 Create a REST api entry point to easily access one or more deposits with a user-friendly interface | ||
Migrated | gitlab-migration | T1010 Improve error messages for deposit checks | ||
Migrated | gitlab-migration | T1170 Add deposit-admin tab to the admin interface | ||
Migrated | gitlab-migration | T1169 Add entry point to return list of deposits for the admin interface |
Raise an exception that is more useful than P279.
ValueError("unexpected mime type $foo") for example..
Raise an exception that is more useful than P279.
ValueError("unexpected mime type $foo") for example..
To give details, that's not supposed to happen.
A 500 error is really a bug.
Currently it should return a 400 (bad request) with the error message explaining why the request is wrong.
Here the mimetype check happens, as it's wrong, continues to explain but the code within explodes, thus the 500.
That's the culprit line:
https://forge.softwareheritage.org/source/swh-deposit/browse/master/swh/deposit/api/deposit_update.py$63
Checking, i introduced it to support other mimetypes.
Unfortunately, the test checking this is ok for the wrong reason. So here is the hole.
Like i said elsewhere, fixing it ;)
So apparently, there is a hole in the tests.
Yes, a bunch of stuff went wrong there, see commit rDDEP173905825e71b71bb4d0960efcf270ac71547c0e for details (oops ;)