diff --git a/rivetkit-typescript/packages/rivetkit/src/common/utils.ts b/rivetkit-typescript/packages/rivetkit/src/common/utils.ts index 00918043c4..e06b209391 100644 --- a/rivetkit-typescript/packages/rivetkit/src/common/utils.ts +++ b/rivetkit-typescript/packages/rivetkit/src/common/utils.ts @@ -1,7 +1,7 @@ import type { Next } from "hono"; import type { ContentfulStatusCode } from "hono/utils/http-status"; import * as errors from "@/actor/errors"; -import { getEnvUniversal } from "@/utils"; +import { EXTRA_ERROR_LOG, getEnvUniversal, VERSION } from "@/utils"; import type { Logger } from "./log"; export function assertUnreachable(x: never): never { @@ -228,8 +228,7 @@ export function deconstructError( group, code, message, - issues: "https://github.com/rivet-dev/rivetkit/issues", - support: "https://rivet.dev/discord", + ...EXTRA_ERROR_LOG, ...extraLog, }); } else if (exposeInternalError) { @@ -246,8 +245,7 @@ export function deconstructError( group, code, message, - issues: "https://github.com/rivet-dev/rivetkit/issues", - support: "https://rivet.dev/discord", + ...EXTRA_ERROR_LOG, ...extraLog, }); } else { @@ -262,8 +260,7 @@ export function deconstructError( group, code, message, - issues: "https://github.com/rivet-dev/rivetkit/issues", - support: "https://rivet.dev/discord", + ...EXTRA_ERROR_LOG, ...extraLog, }); } @@ -281,8 +278,7 @@ export function deconstructError( msg: "internal error", error: getErrorMessage(error), stack: (error as Error)?.stack, - issues: "https://github.com/rivet-dev/rivetkit/issues", - support: "https://rivet.dev/discord", + ...EXTRA_ERROR_LOG, ...extraLog, }); } diff --git a/rivetkit-typescript/packages/rivetkit/src/engine-process/mod.ts b/rivetkit-typescript/packages/rivetkit/src/engine-process/mod.ts index bd6f01e8f2..fa75b65f12 100644 --- a/rivetkit-typescript/packages/rivetkit/src/engine-process/mod.ts +++ b/rivetkit-typescript/packages/rivetkit/src/engine-process/mod.ts @@ -8,6 +8,7 @@ import { ensureDirectoryExists, getStoragePath, } from "@/drivers/file-system/utils"; +import { EXTRA_ERROR_LOG } from "@/utils"; import { logger } from "./log"; export const ENGINE_PORT = 6420; @@ -110,8 +111,7 @@ export async function ensureEngineProcess( msg: "engine process exited, please report this error", code, signal, - issues: "https://github.com/rivet-dev/rivetkit/issues", - support: "https://rivet.dev/discord", + ...EXTRA_ERROR_LOG, }); // Clean up log streams stdoutStream.end(); @@ -228,8 +228,7 @@ async function downloadEngineBinaryIfNeeded( msg: "engine download failed, please report this error", tempPath, error, - issues: "https://github.com/rivet-dev/rivetkit/issues", - support: "https://rivet.dev/discord", + ...EXTRA_ERROR_LOG, }); try { await fs.unlink(tempPath); diff --git a/rivetkit-typescript/packages/rivetkit/src/utils.ts b/rivetkit-typescript/packages/rivetkit/src/utils.ts index 6f788637bb..797978c934 100644 --- a/rivetkit-typescript/packages/rivetkit/src/utils.ts +++ b/rivetkit-typescript/packages/rivetkit/src/utils.ts @@ -263,3 +263,9 @@ export function arrayBuffersEqual( } return true; } + +export const EXTRA_ERROR_LOG = { + issues: "https://github.com/rivet-dev/rivetkit/issues", + support: "https://rivet.dev/discord", + version: VERSION, +};