-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Add error data to ApifyApiError #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add tests.
tests/unit/test_client_errors.py
Outdated
|
||
|
||
@respx.mock | ||
@pytest.fixture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this autoused somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used by
@pytest.mark.usefixtures('mocked_response')
I would normally just pass the fixture into the args, but then ruff is complaining about unused args :-(, so I thought this somewhat less common way of using fixtures is better than #ignore comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer either fixture(autouse=True) or disabling that rule for tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#1356) Add Python variant example of catching dataset validation errors. Documents this change: apify/apify-client-python#314
Add error data to ApifyApiError when available.
Add tests.
Closes: #306