소스 검색

Fix status codes on internal error.

master
Ben Kurtovic 7 년 전
부모
커밋
493a077e48
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -0
      app.py
  2. +3
    -2
      calefaction/util.py

+ 1
- 0
app.py 파일 보기

@@ -96,6 +96,7 @@ def set_style(style):
return "", 204

@app.errorhandler(404)
@app.catch_exceptions
def page_not_found(err):
"""Render and return the 404 error template."""
return render_template("404.mako"), 404


+ 3
- 2
calefaction/util.py 파일 보기

@@ -47,10 +47,11 @@ def make_error_catcher(app, error_template):
raise
except TemplateError as exc:
app.logger.error("Caught exception:\n{0}".format(exc.text))
return render_template(error_template, traceback=exc.text)
trace = exc.text
except Exception:
app.logger.exception("Caught exception:")
return render_template(error_template, traceback=format_exc())
trace = format_exc()
return render_template(error_template, traceback=trace), 500
return inner
return callback



불러오는 중...
취소
저장