| Total Complexity | 2 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from flask import jsonify |
||
| 2 | |||
| 3 | |||
| 4 | def http_exception_handler(e): |
||
| 5 | return jsonify({ |
||
| 6 | 'msg': e.description |
||
| 7 | }), e.code |
||
| 8 | |||
| 9 | |||
| 10 | def broad_exception_error_handler(e): |
||
| 11 | return jsonify({ |
||
| 12 | 'msg': str(e), |
||
| 13 | }), 500 |
||
| 14 |