goext/ginext/commonapierr/enums.go

22 lines
621 B
Go
Raw Normal View History

2023-07-18 15:12:06 +02:00
package commonapierr
2023-07-18 14:40:10 +02:00
type APIErrorCode struct {
HTTPStatusCode int
Key string
}
//goland:noinspection GoSnakeCaseUsage
var (
NotImplemented = APIErrorCode{500, "NOT_IMPLEMENTED"}
InternalError = APIErrorCode{500, "INTERNAL_ERROR"}
Panic = APIErrorCode{500, "PANIC"}
BindFailURI = APIErrorCode{400, "BINDFAIL_URI"}
BindFailQuery = APIErrorCode{400, "BINDFAIL_QUERY"}
BindFailJSON = APIErrorCode{400, "BINDFAIL_JSON"}
BindFailFormData = APIErrorCode{400, "BINDFAIL_FORMDATA"}
Unauthorized = APIErrorCode{401, "UNAUTHORIZED"}
AuthFailed = APIErrorCode{401, "AUTH_FAILED"}
)