5
0
mirror of git://git.proxmox.com/git/pve-network.git synced 2025-01-06 17:18:00 +03:00

ipam: phpipam: add subnet create error handling

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2024-01-04 17:11:37 +01:00 committed by Thomas Lamprecht
parent b906257d4a
commit f38c18f7af

View File

@ -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) {