INNER CODE UNIT · Python

_resolve_response_headers_param

akutayural/APIException · api_exception/__init__.py:321

    def _resolve_response_headers_param(value: bool | HeaderKeys | None) -> Tuple[str, ...]:
        default = ("x-request-id", "x-correlation-id", "x-amzn-trace-id")
        if value is True:
            return default
        if not value or value is False:
            return ()
        return _validate_header_keys(value)

    _response_header_keys = _resolve_response_headers_param(response_headers)

    def _response_headers(req: Request) -> Dict[str, str]:
        if not _response_header_keys:
            return {}
        return _collect_headers(req, _response_header_keys)

    # ---- handlers ------------------------------------------------------------

    @app.exception_handler(APIException)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…