MCPcopy
hub / github.com/webiny/webiny-js / fail

Method fail

packages/sdk/src/Result.ts:38–40  ·  view source on GitHub ↗

* Creates a failed `Result` containing the provided error. * * @param error - The error to wrap in a failed result. * @returns A `Result` instance with the error.

(error: E)

Source from the content-addressed store, hash-verified

36 * @returns A `Result` instance with the error.
37 */
38 public static fail<E>(error: E): Result<never, E> {
39 return new Result<never, E>(false, undefined, error);
40 }
41
42 /**
43 * Checks whether the result is successful.

Callers 15

executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45

Calls

no outgoing calls

Tested by 2

executeMethod · 0.36
applyFunction · 0.36