fix for when response status is not okay (#3574)

* fix for when response status is not okay

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-08-20 13:40:21 -07:00
committed by GitHub
parent f77b312ecb
commit 5c472c63d2

View File

@ -65,6 +65,13 @@ export async function exportMake(data: ArrayBuffer): Promise<Response | null> {
console.log('response', response)
if (!response.ok) {
console.error('Error exporting', response)
const text = await response.text()
toast.error('Error exporting: ' + response.statusText + ' ' + text)
return null
}
return response
} catch (error) {
console.error('Error exporting', error)