Skip to content

Commit

Permalink
Makes Multus lib return False on error 401 instead of raising an exce…
Browse files Browse the repository at this point in the history
…ption
  • Loading branch information
Gmerold committed Dec 9, 2024
1 parent bbe7e25 commit 3d91245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charms/kubernetes_charm_libraries/v0/multus.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def network_attachment_definition_is_created(
)
return False
except httpx.HTTPStatusError as e:
if e.response.status_code == 404:
if e.response.status_code in [401, 404]:
raise KubernetesMultusError(
"NetworkAttachmentDefinition resource not found. "
"You may need to install Multus CNI."
Expand Down

0 comments on commit 3d91245

Please sign in to comment.