empty content type error

This commit is contained in:
mpostma 2021-09-30 10:26:30 +02:00 committed by Tamo
parent e400ae900d
commit 137272b8de
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
3 changed files with 24 additions and 3 deletions

View file

@ -83,6 +83,8 @@ pub enum Code {
DumpAlreadyInProgress,
DumpProcessFailed,
MissingContentType,
}
impl Code {
@ -154,6 +156,7 @@ impl Code {
DumpProcessFailed => {
ErrCode::internal("dump_process_failed", StatusCode::INTERNAL_SERVER_ERROR)
}
MissingContentType => ErrCode::invalid("missing_content_type", StatusCode::UNSUPPORTED_MEDIA_TYPE),
}
}