public static boolean canRetryOnError(final StorageException e) {
    return Optional.of(e.getCause())
        .filter(z -> z instanceof RocksDBException)
        .map(RocksDBException.class::cast)
        .map(RocksDBException::getStatus)
        .map(Status::getCode)
        .map(RETRYABLE_STATUS_CODES::contains)
        .map(
            result -> {
              retryableErrorCounter++;
              return result;
            })
        .orElse(false);
  }
Determines if an operation can be retried based on the error received. This method checks if
the cause of the StorageException is a RocksDBException. If it is, it retrieves the status code
of the RocksDBException and checks if it is contained in the list of retryable {@link
StorageExceptionManager.RETRYABLE_STATUS_CODES} status codes.

@param e the StorageException to check
@return true if the operation can be retried, false otherwise
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/StorageExceptionManager.java