Skip to content

Commit 3018874

Browse files
committed
fix: re-export exception classes from generated module
ariadne-codegen copies base_client.py into generated/, creating duplicate class definitions. The generated client raises exceptions from the generated module, so consumers must catch those exact classes. Re-exporting from the package __init__.py ensures that \`from deezer_python_gql import GraphQLClientGraphQLMultiError\` gives the same class identity the client actually raises.
1 parent 22cf4c4 commit 3018874

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

deezer_python_gql/__init__.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
"""Async typed Python client for Deezer's Pipe GraphQL API."""
22

3+
from deezer_python_gql.generated.base_client import (
4+
GraphQLClientError,
5+
GraphQLClientGraphQLError,
6+
GraphQLClientGraphQLMultiError,
7+
GraphQLClientHttpError,
8+
GraphQLClientInvalidResponseError,
9+
)
310
from deezer_python_gql.generated.client import DeezerGQLClient
411

5-
__all__ = ["DeezerGQLClient"]
12+
__all__ = [
13+
"DeezerGQLClient",
14+
"GraphQLClientError",
15+
"GraphQLClientGraphQLError",
16+
"GraphQLClientGraphQLMultiError",
17+
"GraphQLClientHttpError",
18+
"GraphQLClientInvalidResponseError",
19+
]

0 commit comments

Comments
 (0)