This repository was archived by the owner on Sep 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ def main():
7676healthcheck_tpl = default_header_tpl + """
7777<span style="background:#99d100;padding:20px;color:#fff">✓ Proxy is running fine.</span>""" + default_footer_tpl
7878
79+ error_tpl = default_header_tpl + """
80+ <span style="background:#bf1101;padding:20px;color:#fff">✘ {{error.body}}</span>""" + default_footer_tpl
81+
7982install_success_tpl = default_header_tpl + """
8083<span style="background:#99d100;padding:20px;color:#fff">✓ Installation done.</span>""" + default_footer_tpl
8184
@@ -145,9 +148,6 @@ def proxy_trough_helper(url):
145148 return proxy_response
146149
147150
148- def render_error_page (error ):
149- return template (default_tpl , headline = 'Error ' + error .status , body = error .body )
150-
151151#
152152# BOTTLE APP
153153#
@@ -158,11 +158,11 @@ def run_proxy(args):
158158 #
159159 @error (401 )
160160 def error404 (error ):
161- return render_error_page ( error )
161+ return template ( error_tpl , headline = 'Error ' + error . status , error = error )
162162
163163 @error (500 )
164164 def error500 (error ):
165- return render_error_page ( error )
165+ return template ( error_tpl , headline = 'Error ' + error . status , error = error )
166166
167167 #
168168 # SPECIAL ENDPOINTS
You can’t perform that action at this time.
0 commit comments