Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions owslib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ def openURL(url_base, data=None, method='Get', cookies=None, username=None, pass

req = requests.request(method.upper(), url_base, headers=headers, **rkwargs)

if req.status_code in [400, 401, 403]:
if req.status_code == 400:
raise ServiceException(req.text)

if req.status_code in [404, 500, 502, 503, 504]: # add more if needed
if req.status_code in [401, 403, 404, 500, 502, 503, 504]: # add more if needed
req.raise_for_status()

# check for service exceptions without the http header set
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ogcapi_records_pycsw.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_ogcapi_records_pycsw():
assert isinstance(w.response, dict)

pycsw_cite_demo_queryables = w.collection_queryables('metadata:main')
assert len(pycsw_cite_demo_queryables['properties'].keys()) == 18
assert len(pycsw_cite_demo_queryables['properties'].keys()) == 19

# Minimum of limit param is 1
with pytest.raises(RuntimeError):
Expand Down