Avoid consuming fetch response twice (#4460) Fixes #4459 Co-authored-by: as-gh2 <->

26a67b9afe8ce5ce838e8a54c8e770acd915a729

as-gh2 <ashvin.21+gh2@gmail.com>

Signed
1 files changed, +4 -1Ignore whitespace
src/endpoints/content-manager.js+4 -1
@@ -544,10 +544,13 @@ async function downloadJannyCharacter(uuid) {
544 const fileType = imageResult.headers.get('content-type');544 const fileType = imageResult.headers.get('content-type');
545545
546 return { buffer, fileName, fileType };546 return { buffer, fileName, fileType };
547 } else {
548 console.error('Janny failed to download', downloadResult);
547 }549 }
550 } else {
551 console.error('Janny returned error', result.statusText, await result.text());
548 }552 }
549553
550 console.error('Janny returned error', result.statusText, await result.text());
551 throw new Error('Failed to download character');554 throw new Error('Failed to download character');
552}555}
553556