raise exceptions instead of logging them and then failing relatively silently
This commit is contained in:
parent
82478e5006
commit
5e5b8ce200
1 changed files with 3 additions and 3 deletions
|
@ -143,7 +143,7 @@ def store_kubernetes_secret(secret_dict, namespace, update=False):
|
||||||
)
|
)
|
||||||
except FailToCreateError as ex:
|
except FailToCreateError as ex:
|
||||||
current_app.logger.info(f"Secret not created because of exception {ex}")
|
current_app.logger.info(f"Secret not created because of exception {ex}")
|
||||||
return
|
raise ex
|
||||||
current_app.logger.info(f"Secret {verb} with api response: {api_response}")
|
current_app.logger.info(f"Secret {verb} with api response: {api_response}")
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ def store_kustomization(kustomization_template_filepath, app_slug):
|
||||||
except FailToCreateError as ex:
|
except FailToCreateError as ex:
|
||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
f"Could not create {app_slug} Kustomization because of exception {ex}")
|
f"Could not create {app_slug} Kustomization because of exception {ex}")
|
||||||
return False
|
raise ex
|
||||||
current_app.logger.debug(f"Kustomization created with api response: {api_response}")
|
current_app.logger.debug(f"Kustomization created with api response: {api_response}")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ def delete_kustomization(kustomization_name):
|
||||||
except ApiException as ex:
|
except ApiException as ex:
|
||||||
current_app.logger.info(
|
current_app.logger.info(
|
||||||
f"Could not delete {kustomization_name} Kustomization because of exception {ex}")
|
f"Could not delete {kustomization_name} Kustomization because of exception {ex}")
|
||||||
return False
|
raise ex
|
||||||
current_app.logger.debug(f"Kustomization deleted with api response: {api_response}")
|
current_app.logger.debug(f"Kustomization deleted with api response: {api_response}")
|
||||||
return api_response
|
return api_response
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue