Handle file upload errors without response (#7490)

GitOrigin-RevId: 359870a45e501af85618dd4a33b7b1618e8902ac
This commit is contained in:
Alf Eaton 2022-04-22 10:46:25 +01:00 committed by Copybot
parent e096bf051a
commit af77e97e4f

View file

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