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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Source Marketo: Raise config error if quota exceeded #33999
Conversation
The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌 1 Ignored Deployment
|
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 馃帀 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
if errors[0].get("code") == "1029" and re.match("Export daily quota \d+MB exceeded", errors[0].get("message")): | ||
message = "Daily limit for job extractions has been reached (resets daily at 12:00AM CST)." | ||
raise AirbyteTracedException(internal_message=response.text, message=message, failure_type=FailureType.config_error) | ||
result = response.json().get("result")[0] |
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.
nit: this construction looks a little bit strange for me. You are getting result
using safe .get
method which means you expect respone may not have result
in response body. But at the same time you are getting first element [0]
of it like you expect result is allways present. I think it will be more clear if we replace it with this:
response.json()["result"][0]
if you are sure result
will allways be present in response, or this:
response.json().get("result", [None])[0]
What
Resolve https://github.com/airbytehq/oncall/issues/3644
How
Raise config error if quota exceeded and gracefully exit the sync.
Recommended reading order
airbyte-integrations/connectors/source-marketo/source_marketo/source.py
馃毃 User Impact 馃毃
no breaking changes
Pre-merge Actions
Updating a connector
Community member or Airbyter
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.