fix error handling for organization export, fixes ST-426

This commit is contained in:
Gregor Vostrak
2024-09-12 14:46:05 +02:00
parent 9189910136
commit ac85e778a4

View File

@@ -25,6 +25,7 @@ async function exportData() {
loading.value = true;
const organizationId = getCurrentOrganizationId();
if (organizationId) {
try {
const response = await handleApiRequestNotifications(
() =>
api.exportOrganization(
@@ -40,10 +41,12 @@ async function exportData() {
);
if (response) {
showResultModal.value = true;
loading.value = false;
exportResponse.value = response;
window.open(response.download_url, '_self')?.focus();
}
} finally {
loading.value = false;
}
}
}
</script>