Exceptions

imdbio defines a clean exception hierarchy for predictable error handling.

from imdbio import ImdbioError, HTTPError, WAFError, GraphQLError, ParseError

try:
    movie = get_movie("tt0133093")
except WAFError as e:
    print(f"WAF blocked: {e.status_code}")
except HTTPError as e:
    print(f"HTTP error: {e.status_code}")
except ParseError as e:
    print(f"Parse failed: {e}")
except ImdbioError as e:
    print(f"Generic imdbio error: {e}")

Hierarchy