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

Commit f0b8044

Browse files
authored
Merge pull request #173 from mbugert/dev
Raise if response content type is text/html
2 parents 7ae9068 + 41e06f3 commit f0b8044

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)