A script uses a REST API with exponential backoff but accidentally retries on 4xx errors that represent client-side issues. What is the most correct change?
Answer
Retry only on transient conditions (e.g., 429/5xx) and handle 4xx validation errors without retrying
Explanation
Client-side 4xx errors usually won’t succeed with time, so retrying wastes resources. Proper classification ensures retries target transient failures only.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A Cloud Build step fails intermittently because a dependency installation occasionally times out. Which strategy most effectively keeps the pipeline deterministic while allowing recovery?
View question →
A data pipeline reads from Pub/Sub, enriches with a Cloud Function, and writes to a database. One requirement is to ensure that re-delivered messages don’t create multiple identical records. What is the most appropriate technique in Python?
View question →
In the context of automation reliability, which approach best prevents silent data corruption when using idempotent Python handlers with retries?
View question →
A Python automation fetches rows from BigQuery and updates a Google Sheet. The job is re-run with overlapping date ranges. Which technique best ensures that repeated runs do not create duplicate sheet entries?
View question →
Suppose an IT automation stores job metadata in Cloud Storage and later reads it to resume work. Which approach best prevents resuming from inconsistent partial writes?
View question →
The following description is of an automation design choice: It uses a service account to call Google APIs. The script requests access tokens as needed, avoids hardcoding long-lived secrets, and rotates credentials using managed identity features. It also scopes permissions to only the APIs required. Which statement best matches the security intent?
View question →