refactor: use StatusUnsupportedMediaType
This commit is contained in:
parent
d5782c7e86
commit
a1014acf15
|
@ -1769,11 +1769,11 @@ func (s *S5API) downloadMetadata(jc jape.Context) {
|
||||||
|
|
||||||
switch cidDecoded.Type {
|
switch cidDecoded.Type {
|
||||||
case types.CIDTypeRaw:
|
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
|
return
|
||||||
|
|
||||||
case types.CIDTypeResolver:
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue