From 45e2329006a4cc8795b5a41ebc8ad5280db04e83 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Thu, 13 Feb 2025 16:47:16 +0100
Subject: [PATCH] fix(api-bar): response is not available in catch

---
 source/components/form/api-bar.mjs              | 2 +-
 source/components/form/message-state-button.mjs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/components/form/api-bar.mjs b/source/components/form/api-bar.mjs
index 9ecbc7837..bbf53c933 100644
--- a/source/components/form/api-bar.mjs
+++ b/source/components/form/api-bar.mjs
@@ -497,7 +497,7 @@ function executeAPIButton(event, opts) {
 			}
 
 			if (isFunction(failedApiCall)) {
-				failedApiCall.call(self, button, error, response);
+				failedApiCall.call(self, button, error);
 			} else if (
 				button instanceof MessageStateButton ||
 				button instanceof StateButton
diff --git a/source/components/form/message-state-button.mjs b/source/components/form/message-state-button.mjs
index 85abbf247..bbca2798e 100644
--- a/source/components/form/message-state-button.mjs
+++ b/source/components/form/message-state-button.mjs
@@ -99,7 +99,7 @@ class MessageStateButton extends Popper {
 	 * @property {string|HTMLElement} message.content The message content
 	 * @property {string} message.title The message title
 	 * @property {string} message.icon The message icon
-	 * @property {string} mode The mode of the button
+	 * @property {string} mode The mode of the button, can be `manual` or `submit`
 	 * @property {string} labels.button Button label
 	 * @property {boolean} features.disableButton Disable the button
 	 * @property {Object} aria Aria attributes
-- 
GitLab