Skip to content

Commit fa826c1

Browse files
committed
refactor: make loging statement more readable
1 parent a58a8bb commit fa826c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/transport/http/apiv1/response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func newErrorStatus(c *gin.Context, status int, msg string) {
6262
}
6363

6464
func newInternalError(c *gin.Context, err error, msg ...string) {
65-
slog.With("status", "internal error").ErrorContext(c.Request.Context(), err.Error())
65+
slog.ErrorContext(c.Request.Context(), err.Error(), "status", "internal error")
6666

6767
if len(msg) != 0 {
6868
c.AbortWithStatusJSON(http.StatusInternalServerError, response{

0 commit comments

Comments
 (0)