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

Improve rageshake upload experience by providing useful error information #29378

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

Half-Shot
Copy link
Member

@Half-Shot Half-Shot commented Feb 27, 2025

Fixes the Element Web side of element-hq/element-meta#2732

This makes a few changes:

  • The rageshake API now uses fetch (as we have to be conditional about the response type, anyway).
  • We now support Report error responses as JSON matrix-org/rageshake#90, with sensible fallbacks for the old API.
  • The rageshake dialog now shows a translatable error where possible for the failure, falling back to the server provided one.

Previews

For a known errorcode

image

For a unknown errorcode

image

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • [N/A] I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

@Half-Shot Half-Shot changed the title Improve rageshake upload experience by providing useful error infomration Improve rageshake upload experience by providing useful error information Feb 27, 2025
@Half-Shot Half-Shot marked this pull request as ready for review March 3, 2025 14:43
@Half-Shot Half-Shot requested a review from a team as a code owner March 3, 2025 14:43
@Half-Shot Half-Shot requested review from dbkr and MidhunSureshR March 3, 2025 14:43
@@ -407,7 +407,14 @@
"download_logs": "Download logs",
"downloading_logs": "Downloading logs",
"error_empty": "Please tell us what went wrong or, better, create a GitHub issue that describes the problem.",
"failed_send_logs": "Failed to send logs: ",
"failed_send_logs": "Failed to send logs. Could not contact the rageshake server.",
Copy link
Member

@t3chguy t3chguy Mar 3, 2025

Choose a reason for hiding this comment

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

Reusing the i18n key will be confusing here for other languages as the meaning has drastically changed. Also doesn't this fit within "causes"? e.g. cause=unreachable

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we don't actually need to change this now there is sufficient coverage via failed_send_logs_causes for errors returned by the API. For everything else, I think this error is fine.

Copy link
Member

Choose a reason for hiding this comment

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

The previous string (which will be what all other languages use for the foreseeable) is a partial sentence, ending with a colon. It'll never have any text rendered after it again, it'll look broken. It still needs a new key

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

Successfully merging this pull request may close these issues.

2 participants