summaryrefslogtreecommitdiff
path: root/internal/api/handlers_file.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/handlers_file.go')
-rw-r--r--internal/api/handlers_file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/api/handlers_file.go b/internal/api/handlers_file.go
index 386ec6e..ecf55e0 100644
--- a/internal/api/handlers_file.go
+++ b/internal/api/handlers_file.go
@@ -66,7 +66,7 @@ func (s *Server) handleDownload(w http.ResponseWriter, r *http.Request) {
forbidden(w, "forbidden")
return
}
- writeJSON(w, http.StatusInternalServerError, map[string]string{"error": err.Error()})
+ handleError(w, err)
return
}
if res == nil {
@@ -102,7 +102,7 @@ func (s *Server) handleRegenThumbnail(w http.ResponseWriter, r *http.Request) {
forbidden(w, "forbidden")
return
}
- writeJSON(w, http.StatusInternalServerError, map[string]string{"error": err.Error()})
+ handleError(w, err)
return
}
writeJSON(w, http.StatusOK, map[string]string{"status": "ok"})