# Functions
New creates a new we error with the given status code and message with no payload and no attribute.
NewPayload creates a new we error with the given status code, message and payload.
# Constants
Event Categories for flow control events.
Event Categories for flow control events.
Event Categories for flow control events.
# Variables
BadRequestError Should be returned by handlers or filters when the request does not comply with the expected input for the called endpoint.
Continue informs the engine that the filter chain should be interrupted and the handler (if any) should be invoked for the path provided by the event as an attribute.
ForbiddenError should be returned by handlers or filter for authenticated calls that have no access to the requested endpoint.
FoundRedirect Interrupt the flow redirecting the client to whatever location the event carries in the attribute with status 302.
GoneError may be returned by handlers to inform the client the addressed object is gone.
InternalServerError non-specific server side error.
MethodNotAllowedError may be returned by handlers or filters to notify the client that the request has an unsupported method.
MovedPermanentlyRedirect Interrupt the flow redirecting the client to whatever location the event carries in the attribute with status 301.
NotAcceptableError may be returned by handlers or filters to notify the client that the request is not acceptable.
NotFoundError may be returned by filters or handlers for unknown requested resources (acceptable response in case of rest apis), but for normal flows it will be used internally by the engine itself to tag calls to unknown endpoints.
OKInterruption Interrupt the flow and return the status 200 with whatever content is present in the event payload.
PermanentRedirectRedirect Interrupt the flow redirecting the client to whatever location the event carries in the attribute with status 308.
RequestEntityTooLargeError may be returned by handlers or filters to notify the client that the request has a larger content than expected or supported.
RequestURITooLongError may be returned by handlers or filters to notify the client that the request has a longer uri than expected/supported (for example, too many query parameters).
TemporaryRedirectRedirect Interrupt the flow redirecting the client to whatever location the event carries in the attribute with status 307.
UnauthorizedError is the standard error that should be returned for authentication failure.
UnsupportedMediaTypeError may be returned by handlers or filters to notify the client that the content-type is not supported.
Update informs the engine that the filter chain should continue to process the remaining filter in the chain, but the requested path has been updated by the filter with the value provided in the event attribute.
# Structs
Payload holds the content and mimetype of a response that should be sent when handling the event.
# Interfaces
WeEvent is the interface for events that are meant to be used both as error as well as a flow control event.