NewErrorClass creates a new error class. It is the responsibility of the client to guarantee uniqueness of code.
// ErrBadRequest is a generic bad request error. ErrBadRequest = NewErrorClass("bad_request", 400) // ErrUnauthorized is a generic unauthorized error.
// ErrUnauthorized is a generic unauthorized error. ErrUnauthorized = NewErrorClass("unauthorized", 401) // ErrInvalidRequest is the class of errors produced by the generated code when a request
// ErrInvalidRequest is the class of errors produced by the generated code when a request // parameter or payload fails to validate. ErrInvalidRequest = NewErrorClass("invalid_request", 400) // ErrInvalidEncoding is the error produced when a request body fails to be decoded.
NewErrorClass is referenced in 7 repositoriesgithub.com/goadesign/goa
- 9 references in error.go
- 1 reference in middleware/error_handler_test.go
- 1 reference in middleware/security/basicauth/basicauth.go
- 1 reference in middleware/security/jwt/jwt.go
- 1 reference in account.go