Skip to main content

success()

Last updated 1/10/2024

The

success()
is a function on the
Five
object that returns a
FiveErrorSuccess
indicating success and can be used as a return value from functions to tell Five that the outcome is successful.

Available

Client and Server

Function Signature
success([currentResult: FiveError | message: string, [message: string]]) : FiveErrorSuccess;

ParameterTypeDefaultDescription
currentResult
FiveError
null
The current result that you wish to chain this error with
message
stringemptyDescription of the error

Return Value

Returns a

FiveErrorSuccess
object.

Examples

success()