mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-23 03:19:31 +00:00
Added custom error pages, that assists users with common problems.
This commit is contained in:
parent
f36c618da9
commit
a0f5177533
7 changed files with 202 additions and 0 deletions
35
templates/bundles/TwigBundle/Exception/error500.html.twig
Normal file
35
templates/bundles/TwigBundle/Exception/error500.html.twig
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{% extends "bundles/TwigBundle/Exception/error.html.twig" %}
|
||||
|
||||
{% block status_comment %}
|
||||
Something bad happened internally.
|
||||
<br>There is nothing you could do about this, except trying to reload the page.
|
||||
{% endblock %}
|
||||
|
||||
{% block admin_info %}
|
||||
{% if exception.class == "Doctrine\\DBAL\\Exception\\ConnectionException" %}
|
||||
<i>Can not connect to database.</i> Try follwing things:
|
||||
<ul>
|
||||
<li>Check if the database server is running</li>
|
||||
<li>Ensure that <code>DATABASE_URL</code> in <code>.env.local</code> is correct: database name, user and password must be correct.</li>
|
||||
<li>Ensure that the database user has access to the database.</li>
|
||||
</ul>
|
||||
{% elseif exception.class == "Twig\\Error\\RuntimeError" and 'manifest.json' in exception.message %}
|
||||
<i>Can not load frontend assets.</i> Try following things:
|
||||
<ul>
|
||||
<li>Run <kbd>yarn install</kbd> and <kbd>yarn build</kbd> in Part-DB folder.</li>
|
||||
<li>Run <kbd>php bin/console cache:clear</kbd></li>
|
||||
</ul>
|
||||
{% elseif exception.class == "Doctrine\\DBAL\\Exception\\InvalidFieldNameException" %}
|
||||
<i>Invalid database schema.</i> Try following things:
|
||||
<ul>
|
||||
<li>Run <kbd>php bin/console doctrine:migrations:migrate</kbd> to upgrade database schema</li>
|
||||
<li>Run <kbd>php bin/console cache:clear</kbd></li>
|
||||
</ul>
|
||||
{% else %}
|
||||
You could try following things, if this error is unexpected:
|
||||
<ul>
|
||||
<li>Check <code>var/log/prod.log</code> for additional informations</li>
|
||||
<li>Run <kbd>php bin/console cache:clear</kbd> to clear cache</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue