Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit 41e06f3

Browse files
committed
Raise if response content type is text/html. Fixes #172.
1 parent 7ae9068 commit 41e06f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

overpass/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ def get(self, query, responseformat="geojson", verbosity="body", build=True, dat
110110
return list(csv.reader(StringIO(r.text), delimiter="\t"))
111111
elif content_type in ("text/xml", "application/xml", "application/osm3s+xml"):
112112
return r.text
113+
elif content_type.startswith("text/html"):
114+
raise ServerRuntimeError(r.text)
113115
else:
114116
response = json.loads(r.text)
115117

0 commit comments

Comments
 (0)