Skip to content

Commit

Permalink
feat: improve bad request error
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Apr 21, 2023
1 parent 1a80282 commit 6e23e10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ func (s *saveBackupSummaryHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ

err := json.NewDecoder(r.Body).Decode(&summary)
if err != nil {
log.Fatalln("There was an error decoding the request body into the struct")
log.Println("There was an error decoding the request body into the struct")
http.Error(w, "Bad Request", 400)
return
}

saveBackupSummary(summary)
Expand Down

0 comments on commit 6e23e10

Please sign in to comment.