Skip to content

Commit

Permalink
🐛 Fix error handling and improve logging output
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Oct 15, 2024
1 parent 203843b commit 7b56b63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ async function aggregateResults(
stats.usage.total_tokens,
stats.usage.prompt_tokens,
stats.usage.completion_tokens,
host.path.basename(outTrace),
outTrace ? host.path.basename(outTrace) : "",
result.version,
]
.map((s) => String(s))
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,8 @@ export async function startServer(options: { port: string; apiKey?: string }) {
.catch((e) => {
if (canceller.controller.signal.aborted) return
if (!isCancelError(e)) trace.error(e)
logVerbose(
`\nrun ${runId}: failed with ${errorMessage(e)}`
)
logError(`\nrun ${runId}: failed`)
logError(e)
ws?.send(
JSON.stringify(<
PromptScriptEndResponseEvent
Expand Down

0 comments on commit 7b56b63

Please sign in to comment.