Documentation
¶
Index ¶
- type BadRequestError
- type ContextError
- type ContextOperation
- type ExternalAPIError
- type ExternalAPIOperation
- type InvalidActionError
- type InvalidEUAIDError
- type InvalidEnumError
- type InvalidParametersError
- type MethodNotAllowedError
- type QueryError
- type QueryOperation
- type ResourceConflictError
- type ResourceNotFoundError
- type UnauthorizedError
- type UnknownRouteError
- type ValidationError
- type Validations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadRequestError ¶
type BadRequestError struct {
Err error
}
BadRequestError is a typed error for bad request content
func (*BadRequestError) Error ¶
func (e *BadRequestError) Error() string
Error provides the error as a string
func (*BadRequestError) Unwrap ¶
func (e *BadRequestError) Unwrap() error
Unwrap provides the underlying error
type ContextError ¶
type ContextError struct { Operation ContextOperation Object string }
ContextError is a typed error for context issues
func (*ContextError) Error ¶
func (e *ContextError) Error() string
Error provides the error as a string
type ContextOperation ¶
type ContextOperation string
ContextOperation denotes what was happened when the context failed
const ( // ContextGet is for retrieving from the context ContextGet ContextOperation = "Get" // ContextSet is for adding to the context ContextSet ContextOperation = "Set" )
type ExternalAPIError ¶
type ExternalAPIError struct { Err error Model interface{} ModelID string Operation ExternalAPIOperation Source string }
ExternalAPIError is a typed error for query issues
func (*ExternalAPIError) Error ¶
func (e *ExternalAPIError) Error() string
Error provides the error as a string
func (*ExternalAPIError) Unwrap ¶
func (e *ExternalAPIError) Unwrap() error
Unwrap provides the underlying error
type ExternalAPIOperation ¶
type ExternalAPIOperation string
ExternalAPIOperation provides a set of operations that can fail
const ( // Fetch is for failures when fetching data from an external source Fetch ExternalAPIOperation = "Fetch" // Submit is for failures when submitting to an external source Submit ExternalAPIOperation = "Submit" )
type InvalidActionError ¶
type InvalidActionError struct { ActionType models.ActionType Message string }
InvalidActionError indicates that an admin attempted to perform an invalid action on an intake, such as trying to use Progress to New Step on a closed intake (instead of the proper Reopen action)
func (*InvalidActionError) Error ¶
func (e *InvalidActionError) Error() string
type InvalidEUAIDError ¶
type InvalidEUAIDError struct {
EUAID string
}
InvalidEUAIDError indicates that the Okta API didn't find a matching user for the given EUAID
func (*InvalidEUAIDError) Error ¶
func (e *InvalidEUAIDError) Error() string
type InvalidEnumError ¶
InvalidEnumError indicates that a provided enumerated state is not valid. Perhaps it is a string that has been cast as the enum type
func NewInvalidEnumError ¶
func NewInvalidEnumError[EnumType ~string](err error, value EnumType, enumType string) *InvalidEnumError
NewInvalidEnumError creates an invalid state error and wraps it as apprpriate
func (*InvalidEnumError) Error ¶
func (e *InvalidEnumError) Error() string
func (*InvalidEnumError) Unwrap ¶
func (e *InvalidEnumError) Unwrap() error
Unwrap returns the underlying error
type InvalidParametersError ¶
type InvalidParametersError struct {
FunctionName string
}
InvalidParametersError is an error for calling a function with invalid parameters
func (*InvalidParametersError) Error ¶
func (e *InvalidParametersError) Error() string
type MethodNotAllowedError ¶
type MethodNotAllowedError struct {
Method string
}
MethodNotAllowedError is a typed error for an unsupported method
func (*MethodNotAllowedError) Error ¶
func (e *MethodNotAllowedError) Error() string
Error provides the error as a string
type QueryError ¶
type QueryError struct { Err error Model interface{} Operation QueryOperation }
QueryError is a typed error for query issues
func (*QueryError) Unwrap ¶
func (e *QueryError) Unwrap() error
Unwrap provides the underlying error
type QueryOperation ¶
type QueryOperation string
QueryOperation provides a set of operations that can fail
const ( // QueryPost is for failures when creating a resource QueryPost QueryOperation = "Create" // QuerySave is for failures when saving QuerySave QueryOperation = "Save" // QueryFetch is for failures when getting a resource QueryFetch QueryOperation = "Fetch" // QueryUpdate is for failures when updating a resource QueryUpdate QueryOperation = "Update" )
type ResourceConflictError ¶
ResourceConflictError is for when a task can't be completed because of the resource state
func (*ResourceConflictError) Error ¶
func (e *ResourceConflictError) Error() string
Error provides the error as a string
func (*ResourceConflictError) Unwrap ¶
func (e *ResourceConflictError) Unwrap() error
Unwrap provides the underlying error
type ResourceNotFoundError ¶
type ResourceNotFoundError struct { Err error Resource interface{} }
ResourceNotFoundError is a typed error non-existent resources
func (*ResourceNotFoundError) Error ¶
func (e *ResourceNotFoundError) Error() string
Error provides the error as a string
func (*ResourceNotFoundError) Unwrap ¶
func (e *ResourceNotFoundError) Unwrap() error
Unwrap provides the underlying error
type UnauthorizedError ¶
type UnauthorizedError struct {
}UnauthorizedError is a typed error for when authorization fails
func (*UnauthorizedError) Error ¶
func (e *UnauthorizedError) Error() string
Error provides the error as a string
func (*UnauthorizedError) Unwrap ¶
func (e *UnauthorizedError) Unwrap() error
Unwrap provides the underlying error
type UnknownRouteError ¶
type UnknownRouteError struct {
Path string
}
UnknownRouteError is an error for unknown routes
func (*UnknownRouteError) Error ¶
func (e *UnknownRouteError) Error() string
Error provides the error as a string
type ValidationError ¶
type ValidationError struct { Err error Validations Validations Model interface{} ModelID string }
ValidationError is a typed error for issues with validation
func NewValidationError ¶
func NewValidationError(err error, model interface{}, modelID string) ValidationError
NewValidationError returns a validation error with fields instantiated
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error provides the error as a string
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap provides the underlying error
func (ValidationError) WithValidation ¶
func (e ValidationError) WithValidation(key string, message string)
WithValidation allows a failed validation message be added to the ValidationError
type Validations ¶
Validations maps attributes to validation messages
func (Validations) Map ¶
func (v Validations) Map() map[string]string
Map directly returns a map in case implementation of Validations changes