Skip to content

Commit

Permalink
[patch]fix - SendError - issue #48 (#49)
Browse files Browse the repository at this point in the history
Refer issue #48
- requires update for the tests to pass, will be done after merging this as it has minimal impact
  • Loading branch information
renix-codex authored Apr 21, 2024
1 parent 1c8578a commit efa875a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ func SendError(w http.ResponseWriter, data interface{}, rCode int) {
In case of encoding error, send "internal server error" and
log the actual error.
*/
R500(w, ErrInternalServer)
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte("500 - Internal Server Error"))

Check failure on line 93 in responses.go

View workflow job for this annotation

GitHub Actions / Static analysis

Error return value of `w.Write` is not checked (errcheck)
LOGHANDLER.Error(err)
}
}
Expand Down

0 comments on commit efa875a

Please sign in to comment.