Handle HTTPStatusError in get_components function
This commit is contained in:
parent
afe9c9d1f4
commit
6067c324fb
1 changed files with 5 additions and 3 deletions
|
|
@ -119,9 +119,11 @@ def get_components(
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
comp_count = 0
|
comp_count = 0
|
||||||
except Exception:
|
except HTTPStatusError as exc:
|
||||||
#! This should be removed once we fix the bug
|
if exc.response.status_code == 403:
|
||||||
comp_count = 0
|
raise ValueError(
|
||||||
|
"You are not authorized to access this public resource"
|
||||||
|
)
|
||||||
|
|
||||||
if store_api_Key and result:
|
if store_api_Key and result:
|
||||||
# Now, from the result, we need to get the components
|
# Now, from the result, we need to get the components
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue