diff --git a/bin/ngcp-create-subscriber b/bin/ngcp-create-subscriber index 418cf20..359f8db 100755 --- a/bin/ngcp-create-subscriber +++ b/bin/ngcp-create-subscriber @@ -69,7 +69,7 @@ sub main { $data{domain_id} = $tmp->{id}; } } else { - usage("Domain not found"); + die "Domain $opts->{domain} not found\n"; } my $res = $client->request("POST", $uri, \%data); print $res->result."\n"; diff --git a/bin/ngcp-delete-domain b/bin/ngcp-delete-domain index 57e2821..61ef76f 100755 --- a/bin/ngcp-delete-domain +++ b/bin/ngcp-delete-domain @@ -62,10 +62,10 @@ sub main { } else { $dom_id = $tmp->{id}; } - usage("Domain not found") unless $dom_id; + die "Domain $opts->{domain} not found\n" unless $dom_id; $uri .= $dom_id; } else { - usage("Domain not found"); + die "Domain $opts->{domain} not found\n"; } my $res = $client->request("DELETE", $uri, \%data); print $res->result."\n"; diff --git a/bin/ngcp-terminate-subscriber b/bin/ngcp-terminate-subscriber index 0978167..9893b07 100755 --- a/bin/ngcp-terminate-subscriber +++ b/bin/ngcp-terminate-subscriber @@ -57,9 +57,9 @@ sub main { } else { $sub_id = $tmp->{id}; } - usage("Wrong subscriber id found") unless $sub_id =~ /^\d$/; + die "Wrong subscriber id $sub_id found\n" unless $sub_id =~ /^\d$/; } else { - usage("Subscriber not found"); + die "Subscriber $opts->{username}\@$opts->{domain} not found\n"; } $uri = '/api/subscribers/'.$sub_id; my $data = [ { op => 'replace',