Documentation ¶
Index ¶
- func HTTPErrorHandler(err error, c echo.Context)
- type CustomError
- func NewCustomError(code ErrorCode, err error) *CustomError
- func NewOIDCError(message string, raw error) *CustomError
- func NewSystemError(component, failedOperation string, err error) *CustomError
- func NewUnauthorizedError(err error) *CustomError
- func NewValidationError(code ErrorCode, incorrectValue string, err error) *CustomError
- type ErrorCode
- type FositeError
- type FositeErrorCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPErrorHandler ¶
func HTTPErrorHandler(err error, c echo.Context)
Types ¶
type CustomError ¶
type CustomError struct { Code ErrorCode IncorrectValue string FailedOperation string Component string Err error }
func NewCustomError ¶
func NewCustomError(code ErrorCode, err error) *CustomError
func NewOIDCError ¶
func NewOIDCError(message string, raw error) *CustomError
func NewSystemError ¶
func NewSystemError(component, failedOperation string, err error) *CustomError
func NewUnauthorizedError ¶
func NewUnauthorizedError(err error) *CustomError
func NewValidationError ¶
func NewValidationError(code ErrorCode, incorrectValue string, err error) *CustomError
func (*CustomError) Error ¶
func (e *CustomError) Error() string
func (*CustomError) HTTPCodeMsg ¶
func (e *CustomError) HTTPCodeMsg() (int, interface{})
type ErrorCode ¶
type ErrorCode string
const ( SystemError ErrorCode = "system-error" InvalidValue ErrorCode = "invalid-value" AlreadyExist ErrorCode = "already-exist" DoesntExist ErrorCode = "doesnt-exist" ConditionNotMet ErrorCode = "condition-not-met" OIDCError ErrorCode = "oidc-error" OIDCTxNotFound ErrorCode = "oidc-tx-not-found" OIDCPreAuthorizeDoesNotExpectPin ErrorCode = "oidc-pre-authorize-does-not-expect-pin" OIDCPreAuthorizeExpectPin ErrorCode = "oidc-pre-authorize-expect-pin" OIDCPreAuthorizeInvalidPin ErrorCode = "oidc-pre-authorize-invalid-pin" OIDCCredentialFormatNotSupported ErrorCode = "oidc-credential-format-not-supported" //nolint:gosec OIDCCredentialTypeNotSupported ErrorCode = "oidc-credential-type-not-supported" //nolint:gosec )
type FositeError ¶
type FositeError struct {
// contains filtered or unexported fields
}
func NewFositeError ¶
func NewFositeError(code FositeErrorCode, ctx echo.Context, w fositeErrorWriter, err error) *FositeError
func (*FositeError) Error ¶
func (e *FositeError) Error() string
func (*FositeError) WithAccessRequester ¶
func (e *FositeError) WithAccessRequester(requester fosite.AccessRequester) *FositeError
func (*FositeError) WithAuthorizeRequester ¶
func (e *FositeError) WithAuthorizeRequester(requester fosite.AuthorizeRequester) *FositeError
func (*FositeError) Write ¶
func (e *FositeError) Write() error
type FositeErrorCode ¶
type FositeErrorCode int
const ( FositeAuthorizeError FositeErrorCode = iota FositeAccessError FositeIntrospectionError FositePARError )
Click to show internal directories.
Click to hide internal directories.