fix: ApiError uses statusCode not status (typecheck fix)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user