Skip to content

Commit

Permalink
Add publisherdb api call response check in case call fails
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 715146504
  • Loading branch information
vertex-mg-bot authored and copybara-github committed Jan 14, 2025
1 parent a7c1b9a commit 7696140
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -605,11 +605,12 @@
" response.raise_for_status()\n",
" response = response.json()\n",
" if (\n",
" response.get(\"supportedActions\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" .items()\n",
" == {}.items()\n",
" len(\n",
" response.get(\"supportedActions\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" )\n",
" == 0\n",
" ):\n",
" raise ValueError(\n",
" f\"No supportedActions.multiDeployVertex found in {REGION}. You can skip this section or try a different region.\"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,12 @@
" response.raise_for_status()\n",
" response = response.json()\n",
" if (\n",
" response.get(\"supportedActions\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" .items()\n",
" == {}.items()\n",
" len(\n",
" response.get(\"supportedActions\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" .get(\"multiDeployVertex\", {})\n",
" )\n",
" == 0\n",
" ):\n",
" raise ValueError(\n",
" f\"No supportedActions.multiDeployVertex found in {REGION}. You can skip this section or try a different region.\"\n",
Expand Down

0 comments on commit 7696140

Please sign in to comment.