Skip to content

Commit

Permalink
Raise an exception for unsuccessful HTTP codes from Porter sample req…
Browse files Browse the repository at this point in the history
…uest.
  • Loading branch information
derekpierre committed Aug 21, 2024
1 parent 0067b74 commit d78c076
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deployment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ape.contracts import ContractContainer, ContractInstance
from ape_etherscan.utils import API_KEY_ENV_KEY_MAP

from deployment.constants import ARTIFACTS_DIR, LYNX, MAINNET, PORTER_SAMPLING_ENDPOINTS, TAPIR
from deployment.constants import ARTIFACTS_DIR, MAINNET, PORTER_SAMPLING_ENDPOINTS
from deployment.networks import is_local_network


Expand Down Expand Up @@ -192,6 +192,8 @@ def sample_nodes(
params["min_version"] = min_version

response = requests.get(porter_endpoint, params=params)
response.raise_for_status()

data = response.json()
result = sorted(data["result"]["ursulas"], key=lambda x: x.lower())

Expand Down

0 comments on commit d78c076

Please sign in to comment.