If the action was successful, it includes a message and an optional payload.
If the action was unsuccessful, it includes a message, an error code and its
corresponding payload as defined in ErrorMap.
Type Parameters
SuccessPayloadextendsvoid|object
The payload on success, or void.
ErrorMapextendsvoid|object
A map where each key is an error code, and the
corresponding value is the payload associated with that specific error.
Represents the result of an action.
If the action was successful, it includes a message and an optional payload. If the action was unsuccessful, it includes a message, an error code and its corresponding payload as defined in
ErrorMap
.