mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-18 21:21:11 +02:00
remove user-facing errors
This commit is contained in:
parent
7f04dc56bd
commit
08e76edd51
6 changed files with 10 additions and 10 deletions
|
|
@ -53,7 +53,7 @@ export async function GET(request: Request, props: { params: Promise<{ streamId:
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error processing copilot stream:', error);
|
console.error('Error processing copilot stream:', error);
|
||||||
controller.error(error);
|
controller.error(new Error("Something went wrong. Please try again."));
|
||||||
} finally {
|
} finally {
|
||||||
// log copilot usage
|
// log copilot usage
|
||||||
if (USE_BILLING && billingCustomerId) {
|
if (USE_BILLING && billingCustomerId) {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export async function GET(request: Request, props: { params: Promise<{ streamId:
|
||||||
console.error('Error processing stream:', error);
|
console.error('Error processing stream:', error);
|
||||||
const errMessage: z.infer<typeof TurnEvent> = {
|
const errMessage: z.infer<typeof TurnEvent> = {
|
||||||
type: "error",
|
type: "error",
|
||||||
error: `Error processing stream: ${error}`,
|
error: "Something went wrong. Please try again.",
|
||||||
isBillingError: false,
|
isBillingError: false,
|
||||||
};
|
};
|
||||||
controller.enqueue(encoder.encode(`event: message\ndata: ${JSON.stringify(errMessage)}\n\n`));
|
controller.enqueue(encoder.encode(`event: message\ndata: ${JSON.stringify(errMessage)}\n\n`));
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export async function POST(
|
||||||
controller.close();
|
controller.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(`Error processing stream: ${error}`);
|
logger.log(`Error processing stream: ${error}`);
|
||||||
controller.error(error);
|
controller.error(new Error("Something went wrong. Please try again."));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@ async function runDeletionPipeline(_logger: PrefixLogger, job: z.infer<typeof Da
|
||||||
logger.log("Error processing doc:", e);
|
logger.log("Error processing doc:", e);
|
||||||
await dataSourceDocsRepository.updateByVersion(doc.id, doc.version, {
|
await dataSourceDocsRepository.updateByVersion(doc.id, doc.version, {
|
||||||
status: "error",
|
status: "error",
|
||||||
error: e.message,
|
error: "Error processing doc",
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
// log usage in billing
|
// log usage in billing
|
||||||
|
|
@ -466,7 +466,7 @@ async function runDeletionPipeline(_logger: PrefixLogger, job: z.infer<typeof Da
|
||||||
logger.log("Error deleting doc:", e);
|
logger.log("Error deleting doc:", e);
|
||||||
await dataSourceDocsRepository.updateByVersion(doc.id, doc.version, {
|
await dataSourceDocsRepository.updateByVersion(doc.id, doc.version, {
|
||||||
status: "error",
|
status: "error",
|
||||||
error: e.message,
|
error: "Error deleting doc",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ export function createMockTool(
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(`Error executing mock tool ${config.name}:`, error);
|
logger.log(`Error executing mock tool ${config.name}:`, error);
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
error: `Mock tool execution failed: ${error}`,
|
error: "Tool execution failed!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -447,7 +447,7 @@ export function createWebhookTool(
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(`Error executing webhook tool ${config.name}:`, error);
|
logger.log(`Error executing webhook tool ${config.name}:`, error);
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
error: `Tool execution failed: ${error}`,
|
error: "Tool execution failed!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -482,7 +482,7 @@ export function createMcpTool(
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(`Error executing mcp tool ${name}:`, error);
|
logger.log(`Error executing mcp tool ${name}:`, error);
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
error: `Tool execution failed: ${error}`,
|
error: "Tool execution failed!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -521,7 +521,7 @@ export function createComposioTool(
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log(`Error executing composio tool ${name}:`, error);
|
logger.log(`Error executing composio tool ${name}:`, error);
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
error: `Tool execution failed: ${error}`,
|
error: "Tool execution failed!",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ export class JobsWorker implements IJobsWorker {
|
||||||
await this.jobsRepository.update(job.id, {
|
await this.jobsRepository.update(job.id, {
|
||||||
status: "failed",
|
status: "failed",
|
||||||
output: {
|
output: {
|
||||||
error: error instanceof Error ? error.message : "Unknown error",
|
error: "Something went wrong. Please try again.",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue