Skip to content

Commit 62a525b

Browse files
committed
fix: log on sever errors returned to client
1 parent cb20afc commit 62a525b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/utils/utils.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func GetSecret(r *http.Request) (string, bool) {
2828
}
2929

3030
func CloseWithCodeAndMessage(w http.ResponseWriter, code int, message string) {
31+
slog.Error(message, slog.Int("code", code))
3132
w.WriteHeader(code)
3233
w.Write([]byte(message))
3334
}

0 commit comments

Comments
 (0)