Files
serveg/internal/http/errors.go
T
2026-11-01 20:43:08 +01:00

15 lines
261 B
Go

package http
type HttpError struct {
Status StatusCode
Msg string
}
func (e *HttpError) Error() string {
return e.Status.String() + ": " + e.Msg
}
func NewHttpError(code StatusCode, msg string) *HttpError {
return &HttpError{Status: code, Msg: msg}
}