When the below executes, no UI changes take place and the error Error: Unknown action
is logged in the console at a.port1.onmessage (index.ts.56:13)
sdk.execute(
Command.OPEN_MODAL, {
type: Modal.CUSTOM_MODAL,
action_id: 'guid-from-my-custom-model-id',
data: { membershipId }
}).catch(error => { console.error(error);
index.ts
channel.port1.onmessage = ({ data: response }: { data: MessageChannelCommandResponse<K> }) => {
channel.port1.close();
const { error, data } = response;
if (error) {
reject(new Error(error)); // Error thrown from here.
} else {
resolve(data);
}
};
I’m not seeing any bugs reported anywhere, so I assume I have a fundamental issue in the way I’m interpreting the documentation.
Any clues what the error indicates so I can troubleshoot? I assume it means my action_id
is invalid, but it is literally copied directly from the field in the Custom Modal Extension UI, so I can’t see why it would be incorrect. Perhaps there is a way to list valid actions to see if it is under a different name?