Coverage for api/proscai/errors.py: 60%
5 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-10-18 15:59 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-10-18 15:59 -0600
1from apps.logs.models import ProscaiLog
3def send_email(r, *args, **kwargs):
4 pass
6def log_error(r, *args, **kwargs):
7 ProscaiLog.objects.create(
8 url_request = r.url,
9 response_headers = r.headers,
10 response_status = r.status_code,
11 response_body = r.content,
12 method = r.request.method,
13 request_headers = r.request.headers,
14 request_body = r.request.body,
15 )