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:
@ -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)
|
||||
|
Reference in New Issue
Block a user