Files
x/groute/router/rerrors/500s.go

15 lines
280 B
Go
Raw Normal View History

package rerrors
import (
"errors"
"net/http"
)
func InternalError(errs ...error) RouteError {
err := errors.Join(errs...)
return NewRouteError(http.StatusInternalServerError, "Internal server error", map[string]any{
"errors": err,
"errors_desc": err.Error(),
})
}