Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-hoops-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@saleor/app-sdk": patch
---

more verbose "Failed to generate action ID" error
4 changes: 3 additions & 1 deletion src/app-bridge/actions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ describe("actions.ts", () => {
actions.Notification({
title: "Test",
}),
).throws("Failed to generate action ID. Please ensure you are using https or localhost");
).throws(
"Failed to generate action ID, likely as your browser doesn't consider current session as Secure Context. Please ensure you are using https or localhost, or current IP/domain is in 'dom.securecontext.allowlist'/'#unsafely-treat-insecure-origin-as-secure' if you trust it.",
);
});
});
4 changes: 3 additions & 1 deletion src/app-bridge/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ function withActionId<Name extends ActionType, Payload extends {}, T extends Act
},
};
} catch (e) {
throw new Error("Failed to generate action ID. Please ensure you are using https or localhost");
throw new Error(
"Failed to generate action ID, likely as your browser doesn't consider current session as Secure Context. Please ensure you are using https or localhost, or current IP/domain is in 'dom.securecontext.allowlist'/'#unsafely-treat-insecure-origin-as-secure' if you trust it.",
);
}
}

Expand Down
Loading