Question: True or false? Using a try/catch is recommended in case the API call fails.
- True
- False
Explanation
Using try/catch is recommended because API requests can fail due to request errors, authorization issues, rate limits, or temporary service problems. In Amazon Ads API workflows, error handling helps the integration respond safely instead of breaking the application flow. A try/catch block lets the integration capture the failed response and handle it with logging, retry logic, or a user-facing message. This is especially important when working with 4xx and 5xx responses. Proper error handling makes API behavior easier to debug and maintain.
Why the other options are incorrect
False This is incorrect because integrations should handle failed API calls instead of assuming every request will succeed.
Source for verification
https://advertising.amazon.com/API/docs/en-us/reference/concepts/errors
The answer(s) to the question is highlighted in the BOLD text above. You can also find more questions and answers related to the exams on the "Integrating With HubSpot I: Foundations" page.
