Fix export error handling

This commit is contained in:
Nicolas Mowen 2023-09-15 07:22:35 -06:00 committed by GitHub
parent 9185753322
commit e7a5215208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ export default function Export() {
}
})
.catch((error) => {
if (error.response) {
if (error.response?.data?.message) {
setMessage({ text: `Failed to start export: ${error.response.data.message}`, error: true });
} else {
setMessage({ text: `Failed to start export: ${error.message}`, error: true });