Skip to content

Commit 295101f

Browse files
committed
Fix some review comments
1 parent a705746 commit 295101f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/discord/deployCommands.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,14 @@ export const deployTestCommands = async (
235235
const withPerf = <T extends AnyCommand>({ command, handler }: T) => {
236236
return {
237237
command,
238-
handler: (interaction: Parameters<T["handler"]>) => {
238+
handler: (interaction: Parameters<T["handler"]>[0]) => {
239239
trackPerformance(`withPerf HoF ${command.name}`, async () => {
240240
try {
241241
// @ts-expect-error Unclear why this isn't working but it seems fine
242242
await handler(interaction);
243243
} catch (e) {
244244
log("debug", `perf`, "rethrowing error", { error: e });
245+
throw e;
245246
}
246247
});
247248
},

app/helpers/metrics.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,11 @@ const emitEvent = (
168168

169169
(async () => {
170170
try {
171-
await fetch(`https://api.amplitude.com/httpapi?${queryString.stringify(fields)}`);
171+
await fetch(
172+
`https://api.amplitude.com/httpapi?${queryString.stringify(fields)}`,
173+
);
172174
} catch (error) {
173-
log("error", "Metrics", "Failed to emit event", { error: error.message });
175+
log("error", "Metrics", "Failed to emit event", { error });
174176
}
175177
})();
176178
};

0 commit comments

Comments
 (0)