Skip to content

Commit

Permalink
Switch False gzip Error to Warning (#62)
Browse files Browse the repository at this point in the history
* Switch False gzip Error to Warning

By logging errors, events get sent to analytics captures (like Sentry) that aren't actually a problem since the usp can continue to parse the non-gzipped data

* Update usp/helpers.py

* Add changelog entry

---------

Co-authored-by: Freddy Heppell <[email protected]>
  • Loading branch information
redreceipt and freddyheppell authored Jan 23, 2025
1 parent ae51209 commit a9d9169
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

Upcoming
--------

**Bug Fixes**

- Changed log level when a suspected gzipped sitemap can't be un-gzipped from `error` to `warning`, since parsing can usually continue (:pr:`62` by :user:`redreceipt`)

v1.1.0 (2025-01-20)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion usp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def ungzipped_response_content(
data = gunzip(data)
except GunzipException as ex:
# In case of an error, just assume that it's one of the non-gzipped sitemaps with ".gz" extension
log.error(
log.warning(
f"Unable to gunzip response {response}, maybe it's a non-gzipped sitemap: {ex}"
)

Expand Down

0 comments on commit a9d9169

Please sign in to comment.