fix: ApiError uses statusCode not status (typecheck fix)

This commit is contained in:
semih
2026-05-12 08:18:58 +00:00
parent d29b0bf691
commit 93f1877cc3

View File

@@ -1846,7 +1846,7 @@ export function createApiRoutes(store: TaskStore, options?: ServerOptions): Rout
try {
automationStore = resolveAutomationStore(req, scope);
} catch (err) {
if (err instanceof ApiError && err.status === 503) {
if (err instanceof ApiError && err.statusCode === 503) {
return res.json([]);
}
throw err;
@@ -2174,7 +2174,7 @@ export function createApiRoutes(store: TaskStore, options?: ServerOptions): Rout
try {
routineStore = resolveRoutineStore(req, scope);
} catch (err) {
if (err instanceof ApiError && err.status === 503) {
if (err instanceof ApiError && err.statusCode === 503) {
return res.json([]);
}
throw err;