diff options
| author | Alexandre Derumier <aderumier@odiso.com> | 2024-01-04 17:11:37 +0100 |
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2024-02-20 14:39:45 +0100 |
| commit | f38c18f7af670071d9928695a8979d21e5254bf4 (patch) | |
| tree | f69c7d6da09f51b0eed82c12828b34eacb962596 /src | |
| parent | b906257d4a51f1c7d21ff1513a7076cb7013e2d6 (diff) | |
ipam: phpipam: add subnet create error handling
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm index 7b3168d..c38b3d0 100644 --- a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm +++ b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm @@ -51,7 +51,7 @@ sub add_subnet { my $headers = ['Content-Type' => 'application/json; charset=UTF-8', 'Token' => $token]; #search subnet - my $internalid = get_prefix_id($url, $cidr, $headers); + my $internalid = eval { get_prefix_id($url, $cidr, $headers) }; #create subnet if (!$internalid) { |
