From 38ccf6dde00308a8e92451ef2a42c5f711c65f60 Mon Sep 17 00:00:00 2001 From: sylumer <> Date: Sat, 9 Apr 2022 10:54:48 +0100 Subject: [PATCH] Fix Parameter in Context Method The message parameter for the fail() method is not specified in the definition file or generated docs as optional, but the description indicates it is, and it appears to be optional in practical use too. Added the question mark flag to denote the parameter is optional. --- src/Context.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Context.d.ts b/src/Context.d.ts index 16a2d4f1..de64e520 100644 --- a/src/Context.d.ts +++ b/src/Context.d.ts @@ -54,7 +54,7 @@ declare class Context { /** * Tell the context to fail the current action. In effect this is the same as `cancel()` but an error notification will be shown. If a message is included it will be added to the action log to explain the cancellation. */ - fail(message: string): void + fail(message?: string): void /** * Used only when calling a Drafts action from another app via x-callback-url with a `/runAction` URL. Any parameters set via this method will be included as query args when calling the provided `x-success` parameter. As an example, the below: