We recieve an error in our Snapchat connection 20...
# ask-ai
h
We recieve an error in our Snapchat connection 2025-02-10 060410 source ERROR ‘GET’ request to ‘https://adsapi.snapchat.com/v1/ads/2928b6de-5ad7-4414-95cc-0ae8da8a0a29/stats?fields=android_installs%2Cattachment_avg_view_time_millis%2Cattachment_impressions%2Cattachment_quartile_1%2Cattachment_quartile_2%2Cattachment_quartile_3%2Cattachment_total_view_time_millis%2Cattachment_view_completion%2Cavg_screen_time_millis%2Cavg_view_time_millis%2Cimpressions%2Cios_installs%2Cquartile_1%2Cquartile_2%2Cquartile_3%2Cscreen_time_millis%2Cspend%2Cswipe_up_percent%2Cswipes%2Ctotal_installs%2Cvideo_views%2Cvideo_views_time_based%2Cvideo_views_15s%2Cview_completion%2Cview_time_millis%2Cpaid_impressions%2Cearned_impressions%2Ctotal_impressions%2Cplay_time_millis%2Cshares%2Csaves%2Cnative_leads%2Cconversion_purchases%2Cconversion_purchases_value%2Cconversion_save%2Cconversion_start_checkout%2Cconversion_add_cart%2Cconversion_view_content%2Cconversion_add_billing%2Cconversion_searches%2Cconversion_level_completes%2Cconversion_app_opens%2Cconversion_page_views%2Cconversion_subscribe%2Cconversion_ad_click%2Cconversion_ad_view%2Cconversion_complete_tutorial%2Cconversion_invite%2Cconversion_login%2Cconversion_share%2Cconversion_reserve%2Cconversion_achievement_unlocked%2Cconversion_add_to_wishlist%2Cconversion_spend_credits%2Cconversion_rate%2Cconversion_start_trial%2Cconversion_list_view%2Ccustom_event_1%2Ccustom_event_2%2Ccustom_event_3%2Ccustom_event_4%2Ccustom_event_5%2Cstory_opens%2Cstory_completes%2Cattachment_frequency%2Cattachment_uniques%2Cfrequency%2Cuniques%2Ctotal_reach%2Cearned_reach&granularity=DAY&start_time=2025-02-03T23%3A59%3A16&end_time=2025-02-10T00%3A00%3A00’ failed with status code ‘400’ and error message: ‘None’. Request (body): ‘None’. Response (body): ’{’request_status’: ‘ERROR’, ‘request_id’: ‘f15d2c0b-c822-4c49-bf16-a798d8f4c0e6’, ‘debug_message’: ‘Unsupported Stats Query: Start time should start at the beginning of an hour.’, ‘display_message’: ‘Request cannot be processed due to validation error’, ‘error_code’: ‘E1008’}‘. Response (headers): ’{’date’: ‘Mon, 10 Feb 2025 050410 GMT’, ‘x-request-id’: ‘f15d2c0b-c822-4c49-bf16-a798d8f4c0e6’, ‘Content-Length’: ‘267’, ‘content-type’: ‘application/json’, ‘x-tr-st-1’: ‘38’, ‘x-envoy-upstream-service-time’: ‘39’, ‘server’: ‘API Gateway’, ‘x-envoy-decorator-operation’: ‘/v1/’, ‘alt-svc’: ‘clear, h3=“:443”; ma=2592000,h3-29=“:443"; ma=2592000’, ‘strict-transport-security’: ‘max-age=31536000; includeSubDomains’, ‘Via’: ‘1.1 google, 1.1 google’}’. 316 2025-02-10 060410 source ERROR Exception while syncing stream ads_stats_daily Traceback (most recent call last): File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/concurrent/partition_reader.py”, line 40, in process_partition for record in partition.read(): File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py”, line 59, in read for stream_data in self._retriever.read_records(self._json_schema, self._stream_slice): File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py”, line 446, in read_records for stream_data in self._read_pages(record_generator, self.state, _slice): File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py”, line 343, in _read_pages response = self._fetch_next_page(stream_state, stream_slice, next_page_token) File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py”, line 303, in _fetch_next_page return self.requester.send_request( File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/requesters/http_requester.py”, line 339, in send_request request, response = self._http_client.send_request( File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/http/http_client.py”, line 524, in send_request response: requests.Response = self._send_with_retry( File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/http/http_client.py”, line 270, in _send_with_retry response = backoff_handler(rate_limit_backoff_handler(user_backoff_handler))( File “/usr/local/lib/python3.10/site-packages/backoff/_sync.py”, line 105, in retry ret = target(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/backoff/_sync.py”, line 105, in retry ret = target(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/backoff/_sync.py”, line 105, in retry ret = target(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/http/http_client.py”, line 340, in _send self._handle_error_resolution( File “/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/http/http_client.py”, line 427, in _handle_error_resolution raise MessageRepresentationAirbyteTracedErrors( airbyte_cdk.sources.streams.http.http_client.MessageRepresentationAirbyteTracedErrors: Bad request. Please check your request parameters.
k
Based on the error message provided, it appears that you're encountering an issue with your Snapchat Marketing source connector in Airbyte. The error is related to the time format in the API request. Let's break down the problem and provide a solution: The key part of the error message is:
Copy code
'debug_message': 'Unsupported Stats Query: Start time should start at the beginning of an hour.'
This indicates that the Snapchat API is expecting the start time of your query to be at the beginning of an hour, but the request is sending a time that doesn't meet this requirement. To resolve this issue, you need to adjust the start time in your Snapchat Marketing source configuration. Here are the steps you can take: 1. Go to your Airbyte dashboard and find the Snapchat Marketing source configuration. 2. Look for the "Start Date" field in the configuration. 3. Make sure the start date is set to the beginning of an hour. For example, use a time like "2025-02-03T000000" instead of "2025-02-03T235916". 4. Save the changes to your source configuration. 5. Try running the sync again. If you're still encountering issues after making this change, you may want to check other configuration parameters, especially those related to time ranges or data fetching intervals. It's worth noting that this error is specific to the Snapchat Marketing API and how it handles time-based queries. The Airbyte connector is simply passing through the API's error message. For more information on configuring the Snapchat Marketing source in Airbyte, you can refer to the [Snapchat Marketing Source documentation](https://docs.airbyte.com/integrations/sources/snapchat-marketing#step-2-set-up-the-source-connector-in-airbyte). If the problem persists after making these changes, you may want to reach out to Airbyte support or check the [Airbyte community forums](https://github.com/airbytehq/airbyte/issues) for similar issues or additional troubleshooting steps.