From 4e3dfbec38511935040c9805491cb8ac1341b799 Mon Sep 17 00:00:00 2001 From: Robert van Gent Date: Fri, 26 Jan 2024 11:34:50 -0800 Subject: [PATCH] pubsub/azpubsub: Ensure 401s are not retryable (#3379) --- pubsub/azuresb/azuresb.go | 3 +++ 1 file changed, 3 insertions(+) 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