Skip to content

Commit

Permalink
Update the error on decode.
Browse files Browse the repository at this point in the history
  • Loading branch information
loosla committed Jul 2, 2024
1 parent 5d05831 commit 0700254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func filesContentHandler(w http.ResponseWriter, r *http.Request) {
var req FilesContentRequest
err := json.NewDecoder(r.Body).Decode(&req)
if err != nil {
http.Error(w, "unauthorized", http.StatusUnauthorized) // TODO: check errors.
http.Error(w, err.Error(), http.StatusBadRequest)
return
}

Expand Down

0 comments on commit 0700254

Please sign in to comment.