Skip to content

Commit

Permalink
Raise KeyError for missing resources
Browse files Browse the repository at this point in the history
  • Loading branch information
larsks committed Jan 15, 2025
1 parent 147d137 commit ab2fbb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esiclient/v1/port_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def find_or_create_port(
if address in cidr:
break
else:
raise ValueError(f"unable to find a subnet for address {address}")
raise KeyError(f"unable to find a subnet for address {address}")

return connection.network.create_port(
network_id=internal_network_id,
Expand Down

0 comments on commit ab2fbb4

Please sign in to comment.