From 6db4a46c5f2bc91e5fe5e9a4446407d1e85dac9a Mon Sep 17 00:00:00 2001 From: tracedgod Date: Fri, 26 Apr 2024 16:01:02 -0400 Subject: [PATCH 1/2] update the url_search_issues variable to search for the current error on GitHub instead of showing all issues --- src/invidious/helpers/errors.cr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index 21b789bc5..2f4fca303 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, status_code : Int32, exce # URLs for the error message below url_faq = "https://github.com/iv-org/documentation/blob/master/docs/faq.md" url_search_issues = "https://github.com/iv-org/invidious/issues" + url_search_issues += "?q=is:issue+is:open+" + url_search_issues += URI.encode_www_form("[Bug] " + issue_title) url_switch = "https://redirect.invidious.io" + env.request.resource From 5b11ca22d0bef2c1343c8619b3cac328fa1b3de7 Mon Sep 17 00:00:00 2001 From: tracedgod Date: Sun, 28 Apr 2024 00:04:30 -0400 Subject: [PATCH 2/2] Use string interpolation instead of concatenation --- src/invidious/helpers/errors.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/helpers/errors.cr b/src/invidious/helpers/errors.cr index 2f4fca303..d7a8c3658 100644 --- a/src/invidious/helpers/errors.cr +++ b/src/invidious/helpers/errors.cr @@ -44,7 +44,7 @@ def error_template_helper(env : HTTP::Server::Context, status_code : Int32, exce url_faq = "https://github.com/iv-org/documentation/blob/master/docs/faq.md" url_search_issues = "https://github.com/iv-org/invidious/issues" url_search_issues += "?q=is:issue+is:open+" - url_search_issues += URI.encode_www_form("[Bug] " + issue_title) + url_search_issues += URI.encode_www_form("[Bug] #{issue_title}") url_switch = "https://redirect.invidious.io" + env.request.resource