mark offline when 401 unauthorized

This commit is contained in:
pinks 2023-09-11 01:58:20 +02:00
parent 13bd410bdc
commit 721f3d0b0f
1 changed files with 6 additions and 2 deletions

View File

@ -50,7 +50,11 @@ export async function processJobs(): Promise<never> {
} }
if ( if (
err instanceof SdApiError && err instanceof SdApiError &&
(err.statusCode === 0 /* Network error */ || err.statusCode === 404) (
err.statusCode === 0 /* Network error */ ||
err.statusCode === 404 ||
err.statusCode === 401
)
) { ) {
runningWorkers.delete(worker.name); runningWorkers.delete(worker.name);
logger().warning( logger().warning(