Quiet the logs and capture the errors that were missing
- Activity page: "Delete all" empties the open tab (api/admin/logs/clear-logs, super admin only, logged under system) - Stop logging every WebSocket connect - Log unexpected API errors (safeErrorMessage -> logUnexpectedError), every failed bot job attempt and every job the queue lost - Drop the cron jobs' console output; a failed model sync goes to the logs Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -290,6 +290,38 @@ export default async function processBotJob({
|
||||
return null;
|
||||
});
|
||||
|
||||
/**
|
||||
* Every failed try is on the Activity page, so a model or provider
|
||||
* that keeps failing shows there and not only in one chat.
|
||||
*/
|
||||
if (failed) {
|
||||
const final = failed.status == "failed";
|
||||
|
||||
await logError({
|
||||
title: final
|
||||
? `Bot job #${job_id} failed`
|
||||
: `Bot job #${job_id} failed, retrying (try ${tries})`,
|
||||
error: timed_out ? new Error(timeout_message) : error,
|
||||
user_id: user_id || undefined,
|
||||
details: [
|
||||
{ label: "Bot", value: bot_id },
|
||||
{ label: "Kind", value: job.kind },
|
||||
{ label: "Title", value: job.title || "" },
|
||||
{ label: "Try", value: tries },
|
||||
],
|
||||
metadata: {
|
||||
job_id,
|
||||
bot_id,
|
||||
kind: job.kind,
|
||||
session_id: job.session_id,
|
||||
workspace_id: job.workspace_id,
|
||||
schedule_id,
|
||||
fatal: error instanceof BotJobFatalError,
|
||||
harness_code: error instanceof HarnessError ? error.code : undefined,
|
||||
},
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
if (failed?.notice) {
|
||||
await pushBotNotice({ bot_id, ...failed.notice });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user