Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <csatib02@gmail.com>
  • Loading branch information
csatib02 committed Sep 2, 2024
1 parent d95475e commit 5b695fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ package http

import "github.com/gin-gonic/gin"

type HTTPError struct {
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
}

func (e *HTTPError) Error() string {
func (e *Error) Error() string {
return e.Message
}

// HandleHTTPError is a utility function to handle HTTP errors in Gin handlers.
func HandleHTTPError(c *gin.Context, code int, err error) {
httpErr := &HTTPError{
httpErr := &Error{
Code: code,
Message: err.Error(),
}
Expand Down

0 comments on commit 5b695fd

Please sign in to comment.