Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove has_advertiser_opted_in_odax from adaccounts stream #1

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

dsaxton-1password
Copy link
Owner

Including this field causes the API to respond with a 400 Bad Request:

Traceback (most recent call last):
  File "/meltano/.meltano/extractors/tap-facebook/venv/bin/tap-facebook", line 8, in <module>
    sys.exit(TapFacebook.cli())
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/tap_base.py", line 536, in cli
    tap.sync_all()
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/tap_base.py", line 426, in sync_all
    stream.sync()
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/streams/core.py", line 1162, in sync
    for _ in self._sync_records(context=context):
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/streams/core.py", line 1061, in _sync_records
    for record_result in self.get_records(current_context):
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/streams/rest.py", line 574, in get_records
    for record in self.request_records(context):
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/streams/rest.py", line 395, in request_records
    resp = decorated_request(prepared_request, context)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/backoff/_sync.py", line 105, in retry
    ret = target(*args, **kwargs)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/singer_sdk/streams/rest.py", line 274, in _request
    self.validate_response(response)
  File "/meltano/.meltano/extractors/tap-facebook/venv/lib/python3.8/site-packages/tap_facebook/client.py", line 153, in validate_response
    raise FatalAPIError(msg)
singer_sdk.exceptions.FatalAPIError: 400 Client Error: b'{"error":{"message":"(#12) Since we have ODAX enforcement from v17, this field is useless and should always be assumed true is deprecated for versions v17.0 and higher","type":"OAuthException","code":12,"fbtrace_id":"Ab3F-N9dLyiQFWSx4NEbwf3"}}' (Reason: Bad Request) for path: /v16.0/me/adaccounts

There is a suggested fix here but it does not always seem to work: MeltanoLabs#108.

@dsaxton-1password dsaxton-1password merged commit 2a17426 into main Jan 4, 2024
@dsaxton-1password dsaxton-1password deleted the remove-odax-field branch January 4, 2024 16:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant