Skip to content

Commit

Permalink
fix(sql): throw errors on JSON decoding failures
Browse files Browse the repository at this point in the history
  • Loading branch information
kiike authored and alexfikl committed Mar 7, 2024
1 parent 6ab03a9 commit 5f06403
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion papis_zotero/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ def handle_post_snapshot(self) -> None:
import urllib.parse

rawinput = self.read_input()
data = json.loads(rawinput.decode("utf-8"))
try:
data = json.loads(rawinput.decode("utf-8"))
except json.JSONDecodeError as e:
logger.error("Failed to decode data from the Zotero connector.", exc_info=e)

html_template = """
<!DOCTYPE html>
Expand Down

0 comments on commit 5f06403

Please sign in to comment.