Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve error handling for export downloads #1694

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

testower
Copy link
Collaborator

  • Separate feature detection try/catch from server error handling
  • Replace alert with proper error notifications
  • Add localized error messages for browser support and download errors

Closes #1357

Pending translations for Swedish and Finnish

- Separate feature detection try/catch from server error handling
- Replace alert with proper error notifications
- Add localized error messages for browser support and download errors
Copy link

sonarcloud bot commented Nov 29, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
33.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link

Visit the preview URL for this PR (updated for commit 8e9105d):

https://ent-enki-dev--pr1694-fix-download-file-fe-8l0jsbmb.web.app

(expires Mon, 02 Dec 2024 13:28:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 50f71a028b1cba336bad43cc33ce2755ca3f1855

@@ -650,4 +650,10 @@ export const messages: MessagesKey = {
mapLoadingStopsDataText: 'Loading stops...',
locateStopPoint: 'Locate',
locateStopPointTooltip: 'Locate on map',
exportsDownloadUnsupportedBrowserTitle: 'Browser Not Supported',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swedish: Webbläsaren stöds inte

@@ -650,4 +650,10 @@ export const messages: MessagesKey = {
mapLoadingStopsDataText: 'Loading stops...',
locateStopPoint: 'Locate',
locateStopPointTooltip: 'Locate on map',
exportsDownloadUnsupportedBrowserTitle: 'Browser Not Supported',
exportsDownloadUnsupportedBrowserMessage:
'Sorry, your browser does not support file downloads.',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swedish: Din webbläsare stöder inte nedladdning av filer.

exportsDownloadUnsupportedBrowserTitle: 'Browser Not Supported',
exportsDownloadUnsupportedBrowserMessage:
'Sorry, your browser does not support file downloads.',
exportsDownloadErrorTitle: 'Download Failed',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swedish: Nedladdning misslyckades

'Sorry, your browser does not support file downloads.',
exportsDownloadErrorTitle: 'Download Failed',
exportsDownloadErrorMessage:
'An error occurred while downloading the export. Please try again.',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swedish: Ett fel har uppstått medan filen laddades ner. Försök igen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature detection for export downloads is too broad
1 participant