-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
31 lines (25 loc) · 920 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package uhoh
import (
"errors"
)
var (
ErrGeneral = errors.New("general error")
ErrBadRequest = errors.New("bad request error")
ErrNotFound = errors.New("not found error")
// Data checking
ErrValidation = errors.New("validation error")
// Permissions
ErrForbidden = errors.New("forbidden error")
ErrPermission = errors.New("permission error")
ErrUnauthorized = errors.New("unauthorized error")
ErrMethodNotAllowed = errors.New("method not allowed error")
ErrNotAcceptable = errors.New("not acceptable error")
ErrRequestTimeout = errors.New("request timeout error")
ErrTooManyRequests = errors.New("too many requests error")
// Database
ErrDBConnection = errors.New("database connection error")
ErrDBQuery = errors.New("database query error")
ErrDBNoRows = errors.New("database no rows error")
// Internal errors
ErrInternal = errors.New("internal error")
)