Skip to content

Commit c5591c8

Browse files
Merge pull request #6 from google-marketing-solutions/main
Bringing dev branch in line with main.
2 parents fcd0d00 + 23413d2 commit c5591c8

36 files changed

Lines changed: 1546 additions & 392 deletions

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ authorized redirect URIs. Take note of the Client ID and Client Secret.
9191
Once you have completed the above mentioned steps, proceed by clicking the Open
9292
in Cloud Shell button below.
9393

94+
> [!IMPORTANT]
95+
> To use GenAI features you have to choose `us-central1` as region.
96+
9497
1. Click the button to deploy:
9598

9699
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fgoogle-marketing-solutions%2Fkeyword_platform&cloudshell_git_branch=main&cloudshell_tutorial=setup%2Fdocs%2Finstall.md&show=terminal)
@@ -131,7 +134,7 @@ resource. This opens a menu on the right side of your screen with the
131134
`ADD PRINCIPAL` button. Using this button you can add or remove users by
132135
granting or revoking the `Cloud IAP > IAP-secured Web App User` role.
133136

134-
> [!TIP]
137+
> [!NOTE]
135138
> To make access management easier you can also grant email groups, e.g. a
136139
> [Google Groups](https://groups.google.com) access to the Web App.
137140

py/common/api_utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
"""Common utilities for REST HTTP clients."""
1616

17+
from absl import logging
1718
from typing import Any
1819

1920
import requests
@@ -102,6 +103,10 @@ def send_api_request(
102103
url=url, method=method, json=params, headers=headers
103104
)
104105

105-
response.raise_for_status()
106+
if response.status_code == 403:
107+
logging.warning('403 Caught: %s', response)
108+
return '403: Not allowed (Check permissions)'
109+
else:
110+
response.raise_for_status()
106111

107112
return response.json()

0 commit comments

Comments
 (0)