1

I keep getting the following error when trying to update a Pub/Sub subscription's retry policy:

rpc error: code = Internal desc = A service error has occurred. Please retry your request. If the error persists, please report it. [code=e8c0]

Given the subscription already exists, without any retry policy, and using go 1.19 and cloud.google.com/go/pubsub v1.28.0, this is the code that reproduces it:

sub, err := client.GetSubscription(
    context.Background(), 
    &pubsubpb.GetSubscriptionRequest{
        Subscription: subscriptionName,
        })
// error check omitted for clarity
sub.RetryPolicy = &pubsubpb.RetryPolicy{
    MinimumBackoff: durationpb.New(c.config.MinimumBackoff),
    MaximumBackoff: durationpb.New(c.config.MaximumBackoff),
}
req := pubsubpb.UpdateSubscriptionRequest{
    Subscription: sub,
    UpdateMask: &fieldmaskpb.FieldMask{
        Paths: []string{"retry_policy.minimum_backoff", "retry_policy.maximum_backoff"},
    },
}
_, err := client.UpdateSubscription(context.Background(), &req)
// err is "A service error has occurred. Please retry your request. If the error persists, please report it. [code=e8c0]"

Otherwise, the subscription is completely usable, so it doesn't look like there is any problem with the subscription itself. Am I doing anything the wrong way?

jmmurillo
  • 173
  • 6

1 Answers1

1

For internal errors, it is best to open a support case so that it can be investigated. It requires looking into backend information about your subscription.

Kamal Aboul-Hosn
  • 15,111
  • 1
  • 34
  • 46