feat : add sentry

This commit is contained in:
GuillaumeSD
2024-12-29 17:24:21 +01:00
parent d5a1a03ffd
commit 011a1c21bf
8 changed files with 2688 additions and 65 deletions

View File

@@ -6,6 +6,7 @@ import {
LichessGame,
LichessResponse,
} from "@/types/lichess";
import { logErrorToSentry } from "./sentry";
export const getLichessEval = async (
fen: string,
@@ -52,7 +53,8 @@ export const getLichessEval = async (
lines: linesToKeep,
};
} catch (error) {
console.error(error);
const err = error instanceof Error ? error : new Error("Unknown error");
logErrorToSentry(err, { fen, multiPv });
return {
bestMove: "",
lines: [],