summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--locales/en-US.json2
-rw-r--r--src/invidious/helpers/errors.cr10
2 files changed, 10 insertions, 2 deletions
diff --git a/locales/en-US.json b/locales/en-US.json
index 418798cc..9a2d3294 100644
--- a/locales/en-US.json
+++ b/locales/en-US.json
@@ -433,6 +433,8 @@
"preferences_save_player_pos_label": "Save playback position: ",
"crash_page_you_found_a_bug": "It looks like you found a bug in Invidious!",
"crash_page_before_reporting": "Before reporting a bug, make sure that you have:",
+ "crash_page_refresh": "Tried to refresh the page",
+ "crash_page_switch_instance": "Tried to use another instance",
"crash_page_read_the_faq": "looked at the <a href=\"`x`\">Frenquently Asked Queqtions (FAQ)</a>",
"crash_page_search_issue": "searched for <a href=\"`x`\">existing issues on Github</a>",
"crash_page_report_issue": "If none of the above helped, please <a href=\"`x`\">open a new issue on GitHub</a> (preferably in English) and include the following text in your message (do NOT translate that text):"
diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr
index dbcc6068..d441165d 100644
--- a/src/invidious/helpers/errors.cr
+++ b/src/invidious/helpers/errors.cr
@@ -43,6 +43,8 @@ def error_template_helper(env : HTTP::Server::Context, locale : String?, status_
url_faq = "https://github.com/iv-org/documentation/blob/master/FAQ.md"
url_search_issues = "https://github.com/iv-org/invidious/issues"
+ url_switch = "https://redirect.invidious.io" + env.request.resource
+
url_new_issue = "https://github.com/iv-org/invidious/issues/new"
url_new_issue += "?labels=bug&template=bug_report.md&title="
url_new_issue += URI.encode_www_form("[Bug] " + issue_title)
@@ -52,8 +54,10 @@ def error_template_helper(env : HTTP::Server::Context, locale : String?, status_
<h2>#{translate(locale, "crash_page_you_found_a_bug")}</h2>
<br/><br/>
- <p>#{translate(locale, "crash_page_before_reporting")}</p>
+ <p><b>#{translate(locale, "crash_page_before_reporting")}</b></p>
<ul>
+ <li><a href="#{env.request.resource}">#{translate(locale, "crash_page_refresh")}</a></li>
+ <li><a href="#{url_switch}">#{translate(locale, "crash_page_switch_instance")}</a></li>
<li>#{translate(locale, "crash_page_read_the_faq", url_faq)}</li>
<li>#{translate(locale, "crash_page_search_issue", url_search_issues)}</li>
</ul>
@@ -66,7 +70,9 @@ def error_template_helper(env : HTTP::Server::Context, locale : String?, status_
</div>
END_HTML
- next_steps = error_redirect_helper(env, locale)
+ # Don't show the usual "next steps" widget. The same options are
+ # proposed above the error message, just worded differently.
+ next_steps = ""
return templated "error"
end