Skip to content

Commit

Permalink
Use Pulumi error for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm committed May 15, 2024
1 parent ccddc09 commit ffa682e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data_safe_haven/commands/shm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from data_safe_haven.config import Config, DSHPulumiConfig
from data_safe_haven.context import ContextSettings
from data_safe_haven.exceptions import DataSafeHavenError, DataSafeHavenInputError
from data_safe_haven.exceptions import DataSafeHavenError, DataSafeHavenPulumiError
from data_safe_haven.external import GraphApi
from data_safe_haven.infrastructure import SHMProjectManager

Expand Down Expand Up @@ -105,7 +105,7 @@ def teardown() -> None:
stack.teardown()
except Exception as exc:
msg = f"Unable to teardown Pulumi infrastructure.\n{exc}"
raise DataSafeHavenInputError(msg) from exc
raise DataSafeHavenPulumiError(msg) from exc

# Remove information from config file
del pulumi_config[context.shm_name]
Expand Down
4 changes: 2 additions & 2 deletions data_safe_haven/commands/sre.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from data_safe_haven.config import Config, DSHPulumiConfig
from data_safe_haven.context import ContextSettings
from data_safe_haven.exceptions import DataSafeHavenError, DataSafeHavenInputError
from data_safe_haven.exceptions import DataSafeHavenError, DataSafeHavenPulumiError
from data_safe_haven.external import GraphApi
from data_safe_haven.functions import sanitise_sre_name
from data_safe_haven.infrastructure import SHMProjectManager, SREProjectManager
Expand Down Expand Up @@ -176,7 +176,7 @@ def teardown(
stack.teardown()
except Exception as exc:
msg = f"Unable to teardown Pulumi infrastructure.\n{exc}"
raise DataSafeHavenInputError(msg) from exc
raise DataSafeHavenPulumiError(msg) from exc

# Remove Pulumi project from Pulumi config file
del pulumi_config[name]
Expand Down

0 comments on commit ffa682e

Please sign in to comment.