diff --git a/cps/error_handler.py b/cps/error_handler.py index 373a1434..37b7500e 100644 --- a/cps/error_handler.py +++ b/cps/error_handler.py @@ -35,6 +35,7 @@ def error_http(error): error_code="Error {0}".format(error.code), error_name=error.name, issue=False, + unconfigured=not config.db_configured, instance=config.config_calibre_web_title ), error.code @@ -44,6 +45,7 @@ def internal_error(error): error_code="Internal Server Error", error_name=str(error), issue=True, + unconfigured=False, error_stack=traceback.format_exc().split("\n"), instance=config.config_calibre_web_title ), 500 diff --git a/cps/templates/http_error.html b/cps/templates/http_error.html index 042ed1c5..eb628a5f 100644 --- a/cps/templates/http_error.html +++ b/cps/templates/http_error.html @@ -27,6 +27,9 @@
+ {% if unconfigured %} +
{{_('Calibre-Web Instance is unconfigured, please contact your administrator')}}
+ {% endif %} {% for element in error_stack %}
{{ element }}
{% endfor %} @@ -39,13 +42,15 @@
{% endif %} - -
- - -
diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index a4d5f119..b4ef6efa 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2021-05-24 19:40:59

+

Start Time: 2021-05-27 20:44:36

-

Stop Time: 2021-05-24 22:33:30

+

Stop Time: 2021-05-28 00:00:32

-

Duration: 2h 16 min

+

Duration: 2h 37 min

@@ -516,11 +516,11 @@ - + TestEbookConvertCalibreGDrive 6 - 5 - 1 + 6 + 0 0 0 @@ -548,33 +548,11 @@ - +
TestEbookConvertCalibreGDrive - test_convert_only
- -
- FAIL -
- - - - + PASS @@ -691,12 +669,12 @@ AssertionError: 'Failed' != 'Finished' - + TestEditAdditionalBooks 13 - 5 - 2 - 5 + 12 + 0 + 0 1 Detail @@ -705,33 +683,11 @@ AssertionError: 'Failed' != 'Finished' - +
TestEditAdditionalBooks - test_change_upload_formats
- -
- FAIL -
- - - - + PASS @@ -745,31 +701,11 @@ AssertionError: 'epub' != 'epub, ePub' - +
TestEditAdditionalBooks - test_delete_role
- -
- FAIL -
- - - - + PASS @@ -810,132 +746,38 @@ AssertionError: False is not true - +
TestEditAdditionalBooks - test_title_sort
- -
- ERROR -
- - - - + PASS - +
TestEditAdditionalBooks - test_upload_edit_role
- -
- ERROR -
- - - - + PASS - +
TestEditAdditionalBooks - test_upload_metadata_cbr
- -
- ERROR -
- - - - + PASS - +
TestEditAdditionalBooks - test_upload_metadata_cbt
- -
- ERROR -
- - - - + PASS @@ -966,89 +808,11 @@ IndexError: list index out of range - +
TestEditAdditionalBooks - test_writeonly_path
- -
- ERROR -
- - - - - - - - - - - _ErrorHolder - 1 - 0 - 0 - 1 - 0 - - Detail - - - - - - - -
tearDownClass (test_edit_additional_books)
- - -
- ERROR -
- - - - + PASS @@ -1062,13 +826,13 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele 0 1 - Detail + Detail - +
TestEditBooks - test_download_book
@@ -1077,7 +841,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_author
@@ -1086,7 +850,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_category
@@ -1095,7 +859,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_comments
@@ -1104,7 +868,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_bool
@@ -1113,7 +877,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_categories
@@ -1122,7 +886,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_comment
@@ -1131,7 +895,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_date
@@ -1140,7 +904,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_float
@@ -1149,7 +913,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_int
@@ -1158,7 +922,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_rating
@@ -1167,7 +931,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_single_select
@@ -1176,7 +940,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_custom_text
@@ -1185,7 +949,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_language
@@ -1194,7 +958,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_publisher
@@ -1203,7 +967,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_publishing_date
@@ -1212,7 +976,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_rating
@@ -1221,7 +985,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_series
@@ -1230,7 +994,7 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_edit_title
@@ -1239,19 +1003,19 @@ selenium.common.exceptions.NoSuchElementException: Message: Unable to locate ele - +
TestEditBooks - test_rename_uppercase_lowercase
- SKIP + SKIP
-