Skip to content

Commit 1354d06

Browse files
authored
Catch and raise HTTP 403 Forbidden errors (#958)
* Catch and raise HTTP 403 Forbidden errors
1 parent d5e650d commit 1354d06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

owslib/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def openURL(url_base, data=None, method='Get', cookies=None, username=None, pass
206206

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

209-
if req.status_code in [400, 401]:
209+
if req.status_code in [400, 401, 403]:
210210
raise ServiceException(req.text)
211211

212212
if req.status_code in [404, 500, 502, 503, 504]: # add more if needed

0 commit comments

Comments
 (0)