s3tables: return 404 in handleDeleteNamespace if namespace not found
This commit is contained in:
@@ -383,10 +383,12 @@ func (h *S3TablesHandler) handleDeleteNamespace(w http.ResponseWriter, r *http.R
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
if !errors.Is(err, filer_pb.ErrNotFound) {
|
||||
if errors.Is(err, filer_pb.ErrNotFound) {
|
||||
h.writeError(w, http.StatusNotFound, ErrCodeNoSuchNamespace, fmt.Sprintf("namespace %s not found", flattenNamespace(req.Namespace)))
|
||||
} else {
|
||||
h.writeError(w, http.StatusInternalServerError, ErrCodeInternalError, fmt.Sprintf("failed to list namespace entries: %v", err))
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if hasChildren {
|
||||
|
||||
Reference in New Issue
Block a user