diff --git a/pubsub/azuresb/azuresb.go b/pubsub/azuresb/azuresb.go index 3c1bf17493..9876b0b7fe 100644 --- a/pubsub/azuresb/azuresb.go +++ b/pubsub/azuresb/azuresb.go @@ -566,6 +566,9 @@ func errorCode(err error) (gcerrors.ErrorCode, bool) { if strings.Contains(err.Error(), "status code 404") { return gcerrors.NotFound, false } + if strings.Contains(err.Error(), "status code 401") { + return gcerrors.PermissionDenied, false + } var cond amqp.ErrCond var aderr *amqp.LinkError var aerr *amqp.Error