(self, path: str)
| 1921 | raise HTTPException(status_code=404) |
| 1922 | |
| 1923 | async def _lookup_path(self, path: str) -> tuple[str, os.stat_result | None]: |
| 1924 | try: |
| 1925 | return await run_in_threadpool(self.lookup_path, path) |
| 1926 | except PermissionError: |
| 1927 | raise HTTPException(status_code=401) from None |
| 1928 | except OSError as exc: |
| 1929 | if exc.errno == errno.ENAMETOOLONG: |
| 1930 | raise HTTPException(status_code=404) from None |
| 1931 | raise exc |
| 1932 | except ValueError: |
| 1933 | raise HTTPException(status_code=404) from None |
| 1934 | |
| 1935 | async def _lookup_static_resource( |
| 1936 | self, path: str |
no test coverage detected