Skip to content

Commit

Permalink
Add cert verification failure workaround message on 500 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Nov 28, 2023
1 parent 1157adc commit 67a0c17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lute/dev_api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def disable_backup():
return redirect("/", 302)


@bp.route("/throw_error", methods=["GET"])
def throw_error():
@bp.route("/throw_error/<message>", methods=["GET"])
def throw_error(message):
"Throw an error to ensure handler works!"
raise RuntimeError("testing handler")
raise RuntimeError(message)


@bp.route("/fake_story.html", methods=["GET"])
Expand Down
11 changes: 11 additions & 0 deletions lute/templates/errors/500_error.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
</div>
</div>

{% if "CERTIFICATE_VERIFY_FAILED" in exception_info %}
<blockquote>
<p>This looks like an SSL certificate verification error.</p>
<p>Possible solutions are outlined in
<a href="https://stackoverflow.com/questions/42098126/mac-osx-python-ssl-sslerror-ssl-certificate-verify-failed-certificate-verify"
target="_blank">this StackOverflow post</a> ... see if any of these are effective.
</p>
<p>After applying any solution, restart Lute.</p>
</blockquote>
{% endif %}

<p>If this issue persists, please open a
<a href="https://github.com/jzohrab/lute-v3/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=500%20error"
target="_blank">GitHub Issue</a>, including all of the above information in the issue.
Expand Down

0 comments on commit 67a0c17

Please sign in to comment.