Skip to content

Commit 9152f2c

Browse files
committed
address coderabbit review
1 parent 0c5a005 commit 9152f2c

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

apps/roam/src/utils/syncDgNodesToSupabase.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ export const endSyncTask = async (
7070
intent: "danger",
7171
timeout: 5000,
7272
});
73-
sendErrorEmail({
74-
error: new Error("Discourse node embeddings sync failed"),
75-
type: "Sync Failed",
76-
context: { status },
77-
}).catch(() => {});
7873
}
74+
sendErrorEmail({
75+
error: new Error("Failed to complete discourse node embeddings sync"),
76+
type: "Sync Failed",
77+
context: { status },
78+
}).catch(() => {});
79+
7980
return;
8081
} else if (showToast) {
8182
if (status === "failed") {
@@ -85,11 +86,6 @@ export const endSyncTask = async (
8586
intent: "danger",
8687
timeout: 5000,
8788
});
88-
sendErrorEmail({
89-
error: new Error("Discourse node embeddings sync failed"),
90-
type: "Sync Failed",
91-
context: { status },
92-
}).catch(() => {});
9389
}
9490
}
9591
} catch (error) {
@@ -101,12 +97,12 @@ export const endSyncTask = async (
10197
intent: "danger",
10298
timeout: 5000,
10399
});
104-
sendErrorEmail({
105-
error: new Error("Failed to complete discourse node embeddings sync"),
106-
type: "Sync Failed",
107-
context: { status },
108-
}).catch(() => {});
109100
}
101+
sendErrorEmail({
102+
error: new Error("Failed to complete discourse node embeddings sync"),
103+
type: "Sync Failed",
104+
context: { status },
105+
}).catch(() => {});
110106
}
111107
};
112108

0 commit comments

Comments
 (0)