fix: treat credential validation errors as auth errors (#822) (thanks @sebslight)

This commit is contained in:
Peter Steinberger
2026-01-13 04:02:47 +00:00
parent c4014c0092
commit 2c2ca7f03b
4 changed files with 25 additions and 5 deletions

View File

@@ -6,11 +6,11 @@ import { formatDurationMs } from "../infra/format-duration.js";
import type { RuntimeEnv } from "../runtime.js";
import { resolveTelegramAccount } from "./accounts.js";
import { createTelegramBot } from "./bot.js";
import { makeProxyFetch } from "./proxy.js";
import {
readTelegramUpdateOffset,
writeTelegramUpdateOffset,
} from "./update-offset-store.js";
import { makeProxyFetch } from "./proxy.js";
import { startTelegramWebhook } from "./webhook.js";
export type MonitorTelegramOpts = {

View File

@@ -34,9 +34,9 @@ describe("telegram update offset store", () => {
updateId: 421,
});
expect(
await readTelegramUpdateOffset({ accountId: "primary" }),
).toBe(421);
expect(await readTelegramUpdateOffset({ accountId: "primary" })).toBe(
421,
);
});
});
});