Skip to content

Commit 86e08e4

Browse files
committed
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.
1 parent ed88674 commit 86e08e4

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/alerts/UnexpectedErrorAlert.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
// Copyright (c) 2022-2023 The Pybricks Authors
2+
// Copyright (c) 2022-2026 The Pybricks Authors
33

44
import './UnexpectedErrorAlert.scss';
55
import {
@@ -29,7 +29,11 @@ const UnexpectedErrorAlert: React.FunctionComponent<UnexpectedErrorAlertProps> =
2929

3030
return (
3131
<>
32-
<p>{i18n.translate('message')}</p>
32+
<p>
33+
{i18n.translate('message', {
34+
copyErrorMessage: i18n.translate('copyErrorMessage'),
35+
})}
36+
</p>
3337
<p>{error.message}</p>
3438
{error.stack && (
3539
<>

src/alerts/translations/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"message": "An unexpected error occurred. Please consider reporting this so we can make a better error message.",
2+
"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.",
33
"technicalInfo": "Expand for detailed technical information",
44
"copyErrorMessage": "Copy Error Message",
55
"reportBug": "Report Bug"

0 commit comments

Comments
 (0)