refactor: use StatusUnsupportedMediaType

This commit is contained in:
Derrick Hammer 2024-03-12 11:21:25 -04:00
parent d5782c7e86
commit a1014acf15
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -1769,11 +1769,11 @@ func (s *S5API) downloadMetadata(jc jape.Context) {
switch cidDecoded.Type {
case types.CIDTypeRaw:
_ = jc.Error(errors.New("Raw CIDs do not have metadata"), http.StatusBadRequest)
_ = jc.Error(errors.New("Raw CIDs do not have metadata"), http.StatusUnsupportedMediaType)
return
case types.CIDTypeResolver:
_ = jc.Error(errors.New("Resolver CIDs not yet supported"), http.StatusBadRequest)
_ = jc.Error(errors.New("Resolver CIDs not yet supported"), http.StatusUnsupportedMediaType)
return
}