Skip to content

Commit

Permalink
fix: catching AWS client error to allow for no-infra testing in CI pi…
Browse files Browse the repository at this point in the history
…pelines.
  • Loading branch information
svange committed Nov 13, 2023
1 parent 5341bbe commit 55573ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openbrain/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,13 @@ def _get_resource_from_central_infra(self, friendly_name):
self._central_infra_outputs = {
x["OutputKey"]: x["OutputValue"] for x in response["Stacks"][0]["Outputs"]
}
except NoCredentialsError or ClientError:
except NoCredentialsError or ClientError as e:
logger.warning(
f"Can't find central infrastructure stack {self.INFRA_STACK_NAME} - to find resources from "
f"friendly names. Please define all resource names in the environment OR define the central "
f"infrastructure stack name in the environment and resource friendly names"
)
logger.warning(str(e))
# raise e

return self._central_infra_outputs[friendly_name]
Expand Down

0 comments on commit 55573ad

Please sign in to comment.