2026-11-25 17:38:41: merge [main:34e3ef7687c1506c4d688719cc57c11df2f68a5b];

This commit is contained in:
txix committed 2026-11-25 17:38:41 +03:00
1 parent 45ae8cdd89
commit 6750784d6b
13 files changed
+176 -167

No files matched your search

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