MSP-8995 fix review comments

This commit is contained in:
bogdanmezencev committed 2026-11-20 14:51:43 +03:00
1 parent 5fef05516b
commit 458f94cfd6
12 files changed
+28 -89

No files matched your search

+1 -6
View File
@@ -3,7 +3,6 @@ package httperrors
import (
"net/http"
"github.com/txix-open/isp-kit/errors"
"github.com/txix-open/isp-kit/json"
)
@@ -34,11 +33,7 @@ func (e *HttpError) WriteError(w http.ResponseWriter) error {
"errorMessage": e.userMessage,
"details": e.details,
}
err := json.NewEncoder(w).Encode(data)
if err != nil {
return errors.WithMessage(err, "encode HTTP error response")
}
return nil
return json.NewEncoder(w).Encode(data)
}
func (e *HttpError) WithDetails(details ...any) {