Skip to content

Commit 99d2fc9

Browse files
committed
different error instructions when there's no sentry DSN, so the error wasn't reported and you can't give feedback.
1 parent 651a385 commit 99d2fc9

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

frontend/src/RunCode.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,12 @@ export const showCodeResult = ({birdseyeUrl, passed}) => {
215215
}
216216

217217
function showInternalErrorOutput(message) {
218+
let instructions = process.env.REACT_APP_SENTRY_DSN ?
219+
terms.report_error_instructions :
220+
terms.report_error_instructions_no_feedback;
218221
showOutputParts([
219222
{text: `\n${message.trim()}\n\n`, type: 'internal_error'},
220-
{text: terms.report_error_instructions, type: 'internal_error_explanation'},
223+
{text: instructions, type: 'internal_error_explanation'},
221224
{text: '>>> ', type: 'shell_prompt'},
222225
]);
223226
}

frontend/src/english_terms.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"did_you_mean": "Did you mean...",
2020
"similar_frames_skipped": "Similar frames skipped:",
2121
"report_error_instructions": "Oops, something went wrong! The error has been reported. Here's what you can do:\n\n- Try running the code again.\n- Reload/refresh the page and try again.\n- Try using a different browser.\n- Give feedback from the top-left menu.",
22+
"report_error_instructions_no_feedback": "Oops, something went wrong! Here's what you can do:\n\n- Try running the code again.\n- Reload/refresh the page and try again.\n- Try using a different browser.",
2223
"click_for_error_details": "Click for error details",
2324
"give_feedback": "Give feedback",
2425
"feedback_email_placeholder": "Email (optional)",

translations/english.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19843,6 +19843,14 @@ msgstr ""
1984319843
"- Try using a different browser.\n"
1984419844
"- Give feedback from the top-left menu."
1984519845

19846+
msgid "frontend.report_error_instructions_no_feedback"
19847+
msgstr ""
19848+
"Oops, something went wrong! Here's what you can do:\n"
19849+
"\n"
19850+
"- Try running the code again.\n"
19851+
"- Reload/refresh the page and try again.\n"
19852+
"- Try using a different browser."
19853+
1984619854
msgid "frontend.requirements"
1984719855
msgstr "Requirements"
1984819856

220 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)