{"record":{"id":"4865badf14d84b73","repo":"apache/beam","slug":"kinesis-backend-failed-wait-some-time-and-retry","errorCode":null,"errorMessage":"Kinesis backend failed. Wait some time and retry.","messagePattern":"Kinesis backend failed\\. Wait some time and retry\\.","errorType":"exception","errorClass":"TransientKinesisException","httpStatus":null,"severity":"warning","filePath":"sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/SimplifiedKinesisClient.java","lineNumber":232,"sourceCode":"   * Wraps Amazon specific exceptions into more friendly format.\n   *\n   * @throws TransientKinesisException - in case of recoverable situation, i.e. the request rate is\n   *     too high, Kinesis remote service failed, network issue, etc.\n   * @throws ExpiredIteratorException - if iterator needs to be refreshed\n   * @throws RuntimeException - in all other cases\n   */\n  private static <T> T wrapExceptions(Callable<T> callable) throws TransientKinesisException {\n    try {\n      return callable.call();\n    } catch (ExpiredIteratorException e) {\n      throw e;\n    } catch (LimitExceededException | ProvisionedThroughputExceededException e) {\n      throw new KinesisClientThrottledException(\n          \"Too many requests to Kinesis. Wait some time and retry.\", e);\n    } catch (SdkServiceException e) {\n      if (e.isThrottlingException()\n          || SdkDefaultRetrySetting.RETRYABLE_STATUS_CODES.contains(e.statusCode())) {\n        throw new TransientKinesisException(\"Kinesis backend failed. Wait some time and retry.\", e);\n      }\n      throw e; // others, such as 4xx, are not retryable\n    } catch (SdkClientException e) {\n      if (SdkDefaultRetrySetting.RETRYABLE_EXCEPTIONS.contains(e.getClass())) {\n        throw new TransientKinesisException(\"Retryable failure\", e);\n      }\n      throw e;\n    } catch (Exception e) {\n      throw new RuntimeException(\"Unknown kinesis failure, when trying to reach kinesis\", e);\n    }\n  }\n\n  @Override\n  public void close() throws Exception {\n    try (AutoCloseable c1 = kinesis;\n        AutoCloseable c2 = cloudWatch) {\n      // nothing to do\n    }","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/SimplifiedKinesisClient.java#L214-L250","documentation":"wrapExceptions converts SdkServiceException responses that AWS marks as throttling or that carry retryable HTTP status codes into TransientKinesisException with this message. It signals a server-side Kinesis error the SDK considers safe to retry later (e.g. 5xx), unlike 4xx client errors which are rethrown as-is.","triggerScenarios":"getShardIterator, listShardsFollowingClosedShard, getRecords, or getBacklogBytes receives an SdkServiceException where isThrottlingException() is true or the status code is in SdkDefaultRetrySetting.RETRYABLE_STATUS_CODES (typically 500/502/503/504).","commonSituations":"Kinesis service degradation or internal server errors; transient AWS outages; excessive load on the Kinesis endpoint triggering server-side throttling not classified by the SDK exception types.","solutions":["Retry the operation with exponential backoff — TransientKinesisException explicitly indicates the failure is temporary.","Verify AWS service health (Kinesis status on the AWS Health Dashboard).","Check region/endpoint configuration if 5xx errors persist (wrong endpoint can also surface as server errors)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (TransientKinesisException e) {\n  // transient server-side failure: retry with backoff\n}","preventionTips":["Configure the AWS SDK client retry policy","Watch AWS Health Dashboard for Kinesis incidents"],"tags":["kinesis","aws","transient-error","retry"],"backgroundTag":"api-error-response","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}