Merge "[CORD-967] Added status codes for unauthorized and forbidden"
diff --git a/grpc_client/grpc_client.py b/grpc_client/grpc_client.py
index 1912422..9dee5db 100644
--- a/grpc_client/grpc_client.py
+++ b/grpc_client/grpc_client.py
@@ -299,7 +299,9 @@
             elif code in (
                     grpc.StatusCode.NOT_FOUND,
                     grpc.StatusCode.INVALID_ARGUMENT,
-                    grpc.StatusCode.ALREADY_EXISTS):
+                    grpc.StatusCode.ALREADY_EXISTS,
+                    grpc.StatusCode.UNAUTHENTICATED,
+                    grpc.StatusCode.PERMISSION_DENIED):
 
                 pass  # don't log error, these occur naturally
 
diff --git a/web_server/web_server.py b/web_server/web_server.py
index b3f0385..7676b42 100644
--- a/web_server/web_server.py
+++ b/web_server/web_server.py
@@ -115,6 +115,12 @@
         elif code == StatusCode.ALREADY_EXISTS:
             request.setResponseCode(409)
             return failure.value.details()
+        elif code == StatusCode.UNAUTHENTICATED:
+            request.setResponseCode(401)
+            return failure.value.details()
+        elif code == StatusCode.PERMISSION_DENIED:
+            request.setResponseCode(403)
+            return failure.value.details()
         else:
             raise