From 23a3be6345a17fbc19d4338bbd97e4f3d8ea8d63 Mon Sep 17 00:00:00 2001 From: ston1th Date: Sat, 11 Dec 2021 17:36:38 +0100 Subject: [PATCH] added new status code --- netbox/netbox.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox.go b/netbox/netbox.go index 6889eb6..03a4401 100644 --- a/netbox/netbox.go +++ b/netbox/netbox.go @@ -189,7 +189,7 @@ func (a *Allocator) AllocCIDR() (cidr string, err error) { return } defer resp.Body.Close() - if resp.StatusCode == http.StatusNoContent { + if resp.StatusCode == http.StatusConflict { return "", netalloc.ErrPrefixFull } if resp.StatusCode == http.StatusCreated {