web: Add error details for bug reports
This commit is contained in:
parent
76d13c9193
commit
46254c4a90
3 changed files with 11 additions and 0 deletions
|
|
@ -84,6 +84,7 @@ def get_project_error_page(req, resp, exception: ElixirProjectError):
|
||||||
|
|
||||||
'referer': req.referer if req.referer != req.uri else None,
|
'referer': req.referer if req.referer != req.uri else None,
|
||||||
'bug_report_link': get_github_issue_link(report_error_details),
|
'bug_report_link': get_github_issue_link(report_error_details),
|
||||||
|
'report_error_details': report_error_details,
|
||||||
|
|
||||||
'error_title': exception.title,
|
'error_title': exception.title,
|
||||||
}
|
}
|
||||||
|
|
@ -147,6 +148,7 @@ def get_error_page(req, resp, exception: ElixirProjectError):
|
||||||
|
|
||||||
'referer': req.referer,
|
'referer': req.referer,
|
||||||
'bug_report_link': ADD_ISSUE_LINK + parse.quote(report_error_details),
|
'bug_report_link': ADD_ISSUE_LINK + parse.quote(report_error_details),
|
||||||
|
'report_error_details': report_error_details,
|
||||||
|
|
||||||
'error_title': exception.title,
|
'error_title': exception.title,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -668,6 +668,9 @@ h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#report-error-details-header {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
/* ident */
|
/* ident */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@
|
||||||
<li><a class="link" href="{{ bug_report_link }}">Report a bug</a></li>
|
<li><a class="link" href="{{ bug_report_link }}">Report a bug</a></li>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% if report_error_details is not none -%}
|
||||||
|
<details>
|
||||||
|
<summary id="report-error-details-header">Error details for a bug report</summary>
|
||||||
|
<pre>{{ report_error_details }}</pre>
|
||||||
|
</details>
|
||||||
|
{% endif -%}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue