Files
extrovert/internals/router/errors/500.go
2024-07-24 15:23:07 -03:00

16 lines
372 B
Go

package errors
import (
"errors"
"net/http"
)
type ErrInternal struct {
defaultErr
Err string `json:"error"`
}
func NewErrInternal(err ...error) ErrInternal { return ErrInternal{Err: errors.Join(err...).Error()} }
func (e ErrInternal) Error() string { return e.Err }
func (e ErrInternal) Status() int { return http.StatusInternalServerError }