Skip to content

Commit 0387ab4

Browse files
Update packages/connect-react/examples/nextjs/src/app/page.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent a22d1f5 commit 0387ab4

File tree

1 file changed

+11
-5
lines changed
  • packages/connect-react/examples/nextjs/src/app

1 file changed

+11
-5
lines changed

packages/connect-react/examples/nextjs/src/app/page.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,17 @@ export default function Home() {
3131
configuredProps={configuredProps}
3232
onUpdateConfiguredProps={setConfiguredProps}
3333
onSubmit={async () => {
34-
await client.actionRun({
35-
userId,
36-
actionId: "slack-send-message",
37-
configuredProps,
38-
})}}
34+
try {
35+
await client.actionRun({
36+
userId,
37+
actionId: "slack-send-message",
38+
configuredProps,
39+
});
40+
} catch (error) {
41+
console.error('Action run failed:', error);
42+
// Consider showing user-friendly error message
43+
}
44+
}}
3945
/>
4046
</FrontendClientProvider>
4147
</>

0 commit comments

Comments
 (0)