Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
status_code = int(getattr(value, 'status', 500)) if value is not None else 500
return status_code
else:
response = await resolve_response(value, request=request)
status_code = int(response.status) if response is not None else 500
if verify_transport and request is not None and request.transport is None:
return 499
else:
return status_code
http = HttpTransport.decorator(HttpTransport.request_handler)
http_error = HttpTransport.decorator(HttpTransport.error_handler)
http_static = HttpTransport.decorator(HttpTransport.static_request_handler)
websocket = HttpTransport.decorator(HttpTransport.websocket_handler)
ws = HttpTransport.decorator(HttpTransport.websocket_handler)
async def get_http_response_status(value: Union[str, bytes, Dict, List, Tuple, web.Response, Response, Exception], request: Optional[web.Request] = None, verify_transport: bool = True) -> Optional[int]:
if isinstance(value, Exception) or isinstance(value, web.HTTPException):
status_code = int(getattr(value, 'status', 500)) if value is not None else 500
return status_code
else:
response = await resolve_response(value, request=request)
status_code = int(response.status) if response is not None else 500
if verify_transport and request is not None and request.transport is None:
return 499
else:
return status_code
http = HttpTransport.decorator(HttpTransport.request_handler)
http_error = HttpTransport.decorator(HttpTransport.error_handler)
http_static = HttpTransport.decorator(HttpTransport.static_request_handler)
websocket = HttpTransport.decorator(HttpTransport.websocket_handler)
ws = HttpTransport.decorator(HttpTransport.websocket_handler)
async def get_http_response_status(value: Union[str, bytes, Dict, List, Tuple, web.Response, Response, Exception], request: Optional[web.Request] = None, verify_transport: bool = True) -> Optional[int]:
if isinstance(value, Exception) or isinstance(value, web.HTTPException):
status_code = int(getattr(value, 'status', 500)) if value is not None else 500
return status_code
else:
response = await resolve_response(value, request=request)
status_code = int(response.status) if response is not None else 500
if verify_transport and request is not None and request.transport is None:
return 499
else:
return status_code
http = HttpTransport.decorator(HttpTransport.request_handler)
http_error = HttpTransport.decorator(HttpTransport.error_handler)
http_static = HttpTransport.decorator(HttpTransport.static_request_handler)
websocket = HttpTransport.decorator(HttpTransport.websocket_handler)
ws = HttpTransport.decorator(HttpTransport.websocket_handler)
return status_code
else:
response = await resolve_response(value, request=request)
status_code = int(response.status) if response is not None else 500
if verify_transport and request is not None and request.transport is None:
return 499
else:
return status_code
http = HttpTransport.decorator(HttpTransport.request_handler)
http_error = HttpTransport.decorator(HttpTransport.error_handler)
http_static = HttpTransport.decorator(HttpTransport.static_request_handler)
websocket = HttpTransport.decorator(HttpTransport.websocket_handler)
ws = HttpTransport.decorator(HttpTransport.websocket_handler)
async def get_http_response_status(value: Union[str, bytes, Dict, List, Tuple, web.Response, Response, Exception], request: Optional[web.Request] = None, verify_transport: bool = True) -> Optional[int]:
if isinstance(value, Exception) or isinstance(value, web.HTTPException):
status_code = int(getattr(value, 'status', 500)) if value is not None else 500
return status_code
else:
response = await resolve_response(value, request=request)
status_code = int(response.status) if response is not None else 500
if verify_transport and request is not None and request.transport is None:
return 499
else:
return status_code
http = HttpTransport.decorator(HttpTransport.request_handler)
http_error = HttpTransport.decorator(HttpTransport.error_handler)
http_static = HttpTransport.decorator(HttpTransport.static_request_handler)
websocket = HttpTransport.decorator(HttpTransport.websocket_handler)
ws = HttpTransport.decorator(HttpTransport.websocket_handler)