NewErrorClass creates a new error class. It is the responsibility of the client to guarantee uniqueness of code.
// ErrBasicAuthFailed means it wasn't able to authenticate you with your login/password. var ErrBasicAuthFailed = goa.NewErrorClass("basic_auth_failed", 401) // New creates a static username/password auth middleware.
// ErrJWTError is the error returned by this middleware when any sort of validation or assertion // fails during processing. var ErrJWTError = goa.NewErrorClass("jwt_security_error", 401) type contextKey int
// ErrBadRequest is a generic bad request error. ErrBadRequest = NewErrorClass("bad_request", 400) // ErrUnauthorized is a generic unauthorized error.
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