def error400(error): _add_cors_headers(response) response.set_header('Content-Type', 'application/json') return json.dumps({'detail': error.body})