| 544 | const fileType = imageResult.headers.get('content-type'); | 544 | const fileType = imageResult.headers.get('content-type'); |
| 545 | | 545 | |
| 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 | } |
| 549 | | 553 | |
| 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 | } |
| 553 | | 556 | |