Handle file upload errors without response.body (#7047)

GitOrigin-RevId: a6c06bac5a74d2d4e9ea9c65f5d62b105e17ef24
This commit is contained in:
Alf Eaton 2022-04-08 10:07:51 +01:00 committed by Copybot
parent ef77b23888
commit cdbf3879b4

View file

@ -105,7 +105,8 @@ export default function FileTreeUploadDoc() {
break
default:
setError(response.body.error)
console.error(error)
setError(response.body?.error || 'generic_something_went_wrong')
break
}
})