Skip to content

Commit 8edc858

Browse files
committed
Format error response as text (i.e., strip HTML tags).
1 parent 23d3471 commit 8edc858

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

astroquery/mpc/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def _parse_result(self, result, **kwargs):
10471047
content = result.content.decode()
10481048
table_start = content.find('<pre>')
10491049
if table_start == -1:
1050-
raise InvalidQueryError(content)
1050+
raise InvalidQueryError(BeautifulSoup(content, "html.parser").get_text())
10511051
table_end = content.find('</pre>')
10521052
text_table = content[table_start + 5:table_end]
10531053
SKY = 'raty=a' in result.request.body

0 commit comments

Comments
 (0)