alerts/UnexpectedErrorAlert: expand the message

Expand the unexpected error alert message to include instructions on
what information to provide to make a useful bug report.
This commit is contained in:
David Lechner
2026-01-25 16:53:39 -06:00
parent ed886745ff
commit 86e08e4c94
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2022-2023 The Pybricks Authors
// Copyright (c) 2022-2026 The Pybricks Authors
import './UnexpectedErrorAlert.scss';
import {
@@ -29,7 +29,11 @@ const UnexpectedErrorAlert: React.FunctionComponent<UnexpectedErrorAlertProps> =
return (
<>
<p>{i18n.translate('message')}</p>
<p>
{i18n.translate('message', {
copyErrorMessage: i18n.translate('copyErrorMessage'),
})}
</p>
<p>{error.message}</p>
{error.stack && (
<>
+1 -1
View File
@@ -1,5 +1,5 @@
{
"message": "An unexpected error occurred. Please consider reporting this so we can make a better error message.",
"message": "An unexpected error occurred. Please consider reporting this so we can make a better error message. Click the {copyErrorMessage} button below to copy the technical details and paste it in the bug report. Also include the operating system you are using, the web browser you are using and the actions you performed that led to this error.",
"technicalInfo": "Expand for detailed technical information",
"copyErrorMessage": "Copy Error Message",
"reportBug": "Report Bug"