-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🐛 Source Amplitude: log error when got 404 #6541
Conversation
/test connector=connectors/source-amplitude
|
# sometimes the API throws a 404 error for not obvious reasons, we have to handle it and log it. | ||
try: | ||
yield from super().read_records(sync_mode, cursor_field, stream_slice, stream_state) | ||
except requests.exceptions.HTTPError as error: |
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 think, it will handle all errors rather then only 404.
|
||
|
||
@patch.object(HttpStream, "read_records") | ||
def raise_error(): |
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.
What this for?
airbyte-integrations/connectors/source-amplitude/source_amplitude/api.py
Outdated
Show resolved
Hide resolved
…ude/api.py Co-authored-by: Eugene Kulak <widowmakerreborn@gmail.com>
/test connector=connectors/source-amplitude
|
Please make sure the tests pass! |
Co-authored-by: Davin Chia <davinchia@gmail.com>
airbyte-integrations/connectors/source-amplitude/source_amplitude/api.py
Show resolved
Hide resolved
# Conflicts: # docs/integrations/sources/amplitude.md
…ude/api.py Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
/test connector=connectors/source-amplitude
|
/publish connector=connectors/source-amplitude
|
* Add test * Upd error handling * Update airbyte-integrations/connectors/source-amplitude/source_amplitude/api.py Co-authored-by: Eugene Kulak <widowmakerreborn@gmail.com> * Update docs/integrations/sources/amplitude.md Co-authored-by: Davin Chia <davinchia@gmail.com> * Update airbyte-integrations/connectors/source-amplitude/source_amplitude/api.py Co-authored-by: Sherif A. Nada <snadalive@gmail.com> Co-authored-by: Eugene Kulak <widowmakerreborn@gmail.com> Co-authored-by: Davin Chia <davinchia@gmail.com> Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
What
Fix #6375 - add 404 error handler
How
Update the read_records method (Events stream), add a try / catch clause
Recommended reading order
airbyte-integrations/connectors/source-amplitude/source_amplitude/api.py
Pre-merge Checklist
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described here