Skip to content

Commit

Permalink
fix: await the enqueue method in web actions (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefl authored Oct 29, 2024
1 parent 548b85d commit c9cb82b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/nextjs/src/app/api/chat/webActionsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const createWebActionsPlugin: PluginCreator = (
prisma,
SafetyViolations,
);
enqueue(heliconeErrorMessage);
await enqueue(heliconeErrorMessage);
}

if (error instanceof Error) {
enqueue({
await enqueue({
type: "error",
message: error.message,
value: `Sorry, an error occurred: ${error.message}`,
Expand Down Expand Up @@ -80,7 +80,7 @@ export const createWebActionsPlugin: PluginCreator = (
} catch (error) {
if (error instanceof UserBannedError) {
log.info("User is banned, queueing account lock message");
enqueue({
await enqueue({
type: "action",
action: "SHOW_ACCOUNT_LOCKED",
});
Expand Down

0 comments on commit c9cb82b

Please sign in to comment.