Browse Source

Improve cloud job error logging for RCC provider errors (#9924)

Chris Estreich 1 month ago
parent
commit
6f602fc88e
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/api/providers/roo.ts

+ 5 - 3
src/api/providers/roo.ts

@@ -296,13 +296,15 @@ export class RooHandler extends BaseOpenAiCompatibleProvider<string> {
 				}
 			}
 		} catch (error) {
-			// Log streaming errors with context
-			console.error("[RooHandler] Error during message streaming:", {
+			const errorContext = {
 				error: error instanceof Error ? error.message : String(error),
 				stack: error instanceof Error ? error.stack : undefined,
 				modelId: this.options.apiModelId,
 				hasTaskId: Boolean(metadata?.taskId),
-			})
+			}
+
+			console.error(`[RooHandler] Error during message streaming: ${JSON.stringify(errorContext)}`)
+
 			throw error
 		}
 	}