app/errors/net_errors.go

28 lines
512 B
Go
Raw Permalink Normal View History

2021-12-16 04:11:33 +00:00
package errors
import "net/http"
var ErrorNotFound = Error{
Code: http.StatusNotFound,
ID: "ErrorNotFound",
Message: "not found",
}
var ErrorUnauthorized = Error{
Code: http.StatusUnauthorized,
ID: "ErrorUnauthorized",
Message: "unauthorized",
}
var ErrorForbidden = Error{
Code: http.StatusForbidden,
ID: "ErrorForbidden",
Message: "permission denied",
}
var ErrorBadRequest = Error{
Code: http.StatusBadRequest,
ID: "ErrorBadRequest",
Message: "bad request",
}