From f5daa9b41377a58cb3220bb2ab7c72adc6462196 Mon Sep 17 00:00:00 2001 From: Erroration2022 <99040129+Erroration2022@users.noreply.github.com> Date: Wed, 16 Feb 2022 12:20:47 -0800 Subject: [PATCH] fix: return 403 when VPC-SC violation happens (#1131) This is fixing the issue where VPC-SC violation is not returning 403. Error message map does not recognize VPCSC policy violation error and will default to return an internal server error. Co-authored-by: Tim Swast --- google/cloud/bigquery/job/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/google/cloud/bigquery/job/base.py b/google/cloud/bigquery/job/base.py index 97acab5d2..86701e295 100644 --- a/google/cloud/bigquery/job/base.py +++ b/google/cloud/bigquery/job/base.py @@ -45,6 +45,7 @@ "invalidQuery": http.client.BAD_REQUEST, "notFound": http.client.NOT_FOUND, "notImplemented": http.client.NOT_IMPLEMENTED, + "policyViolation": http.client.FORBIDDEN, "quotaExceeded": http.client.FORBIDDEN, "rateLimitExceeded": http.client.FORBIDDEN, "resourceInUse": http.client.BAD_REQUEST,