This commit is contained in:
Yury Semikhatsky 2024-08-01 17:27:37 -07:00
parent 544aee968f
commit 70e87ad837

View file

@ -220,7 +220,7 @@ export abstract class APIRequestContext extends SdkObject {
let text = fetchResponse.body.toString('utf8'); let text = fetchResponse.body.toString('utf8');
if (text.length > 1000) if (text.length > 1000)
text = text.substring(0, 997) + '...'; text = text.substring(0, 997) + '...';
responseText = `\nResponse text:\n${text}` responseText = `\nResponse text:\n${text}`;
} }
throw new Error(`${fetchResponse.status} ${fetchResponse.statusText}${responseText}`); throw new Error(`${fetchResponse.status} ${fetchResponse.statusText}${responseText}`);
} }