v0.0.189
This commit is contained in:
@@ -2,7 +2,6 @@ package exerr
|
||||
|
||||
import (
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type ErrorCategory struct{ Category string }
|
||||
@@ -35,9 +34,20 @@ type ErrorType struct {
|
||||
}
|
||||
|
||||
var (
|
||||
TypeInternal = ErrorType{"Internal", langext.Ptr(http.StatusInternalServerError)}
|
||||
TypePanic = ErrorType{"Panic", langext.Ptr(http.StatusInternalServerError)}
|
||||
TypeWrap = ErrorType{"Wrap", nil}
|
||||
TypeInternal = ErrorType{"INTERNAL_ERROR", langext.Ptr(500)}
|
||||
TypePanic = ErrorType{"PANIC", langext.Ptr(500)}
|
||||
TypeNotImplemented = ErrorType{"NOT_IMPLEMENTED", langext.Ptr(500)}
|
||||
|
||||
TypeWrap = ErrorType{"Wrap", nil}
|
||||
|
||||
TypeBindFailURI = ErrorType{"BINDFAIL_URI", langext.Ptr(400)}
|
||||
TypeBindFailQuery = ErrorType{"BINDFAIL_QUERY", langext.Ptr(400)}
|
||||
TypeBindFailJSON = ErrorType{"BINDFAIL_JSON", langext.Ptr(400)}
|
||||
TypeBindFailFormData = ErrorType{"BINDFAIL_FORMDATA", langext.Ptr(400)}
|
||||
|
||||
TypeUnauthorized = ErrorType{"UNAUTHORIZED", langext.Ptr(401)}
|
||||
TypeAuthFailed = ErrorType{"AUTH_FAILED", langext.Ptr(401)}
|
||||
|
||||
// other values come from pkgconfig
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user