fix: bad error message
This commit is contained in:
parent
296f7b611e
commit
d5782c7e86
|
@ -1769,7 +1769,7 @@ 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 s5libmetadata"), http.StatusBadRequest)
|
_ = jc.Error(errors.New("Raw CIDs do not have metadata"), http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
|
|
||||||
case types.CIDTypeResolver:
|
case types.CIDTypeResolver:
|
||||||
|
@ -1779,8 +1779,8 @@ func (s *S5API) downloadMetadata(jc jape.Context) {
|
||||||
|
|
||||||
meta, err := s.getNode().Services().Storage().GetMetadataByCID(cidDecoded)
|
meta, err := s.getNode().Services().Storage().GetMetadataByCID(cidDecoded)
|
||||||
|
|
||||||
if jc.Check("error getting s5libmetadata", err) != nil {
|
if jc.Check("error getting metadata", err) != nil {
|
||||||
s.logger.Error("error getting s5libmetadata", zap.Error(err))
|
s.logger.Error("error getting metadata", zap.Error(err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue