()
| 836 | |
| 837 | |
| 838 | def _find_exceptions() -> None: |
| 839 | for obj in globals().values(): |
| 840 | try: |
| 841 | is_http_exception = issubclass(obj, HTTPException) |
| 842 | except TypeError: |
| 843 | is_http_exception = False |
| 844 | if not is_http_exception or obj.code is None: |
| 845 | continue |
| 846 | old_obj = default_exceptions.get(obj.code, None) |
| 847 | if old_obj is not None and issubclass(obj, old_obj): |
| 848 | continue |
| 849 | default_exceptions[obj.code] = obj |
| 850 | |
| 851 | |
| 852 | _find_exceptions() |
no test coverage detected