Update formatting on worker
Build and Push Spoon Images / quality (push) Successful in 1m27s
Build and Push Spoon Images / build-images (push) Successful in 7m13s

This commit is contained in:
Gabriel Brown
2026-06-24 08:40:52 -04:00
parent 5f7d56369f
commit 65aae85369
11 changed files with 130 additions and 93 deletions
+15 -14
View File
@@ -128,8 +128,9 @@ export const startWorkerServer = () => {
sendJson(response, 200, await abortWorkspaceAgent(route.jobId));
return;
}
const interactionMatch =
/^interactions\/([^/]+)\/reply$/.exec(route.action);
const interactionMatch = /^interactions\/([^/]+)\/reply$/.exec(
route.action,
);
if (request.method === 'POST' && interactionMatch?.[1]) {
const body = await parseJson<{
externalRequestId?: string;
@@ -166,21 +167,21 @@ export const startWorkerServer = () => {
return;
}
sendJson(response, 404, { error: 'Not found' });
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
console.error(
`Worker HTTP ${request.method ?? 'UNKNOWN'} ${request.url ?? '/'} failed: ${message}`,
);
const status =
message === 'Unauthorized'
? 401
: message.includes('not supported')
? 409
: 500;
sendJson(response, status, {
error: message,
});
}
const status =
message === 'Unauthorized'
? 401
: message.includes('not supported')
? 409
: 500;
sendJson(response, status, {
error: message,
});
}
})();
});
attachTerminalServer(server);