|
|
@ -173,9 +173,7 @@ export class FetchService implements OnModuleInit { |
|
|
try { |
|
|
try { |
|
|
JSON.parse(body); |
|
|
JSON.parse(body); |
|
|
} catch { |
|
|
} catch { |
|
|
if (!rejectedBody) { |
|
|
rejectedBody = body; |
|
|
rejectedBody = body; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
@ -195,9 +193,9 @@ export class FetchService implements OnModuleInit { |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
this.logger.debug( |
|
|
this.logger.debug( |
|
|
`Web fetch tool response for ${this.redactUrl( |
|
|
`Web fetch tool response for ${this.redactUrl(url)} (${ |
|
|
url |
|
|
sources?.length ?? 0 |
|
|
)}: ${this.getBodyPreview(rejectedBody)}` |
|
|
} sources): ${this.getBodyPreview(rejectedBody || text)}` |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
return undefined; |
|
|
return undefined; |
|
|
|