remove status code from json error message

This commit is contained in:
Izalia Mae 2024-02-16 10:42:22 -05:00
parent afad948f85
commit af1caaf7c9

View file

@ -209,7 +209,7 @@ class Response(AiohttpResponse):
ctype: str = 'text') -> Response: ctype: str = 'text') -> Response:
if ctype == 'json': if ctype == 'json':
body = json.dumps({'status': status, 'error': body}) body = json.dumps({'error': body})
return cls.new(body=body, status=status, ctype=ctype) return cls.new(body=body, status=status, ctype=ctype)