Skip to content

Commit

Permalink
Better hash format error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Jul 15, 2024
1 parent 8fe5b58 commit b1871b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jupyter_server/services/contents/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def get(self, path=""):

hash_str = self.get_query_argument("hash", default="0")
if hash_str not in {"0", "1"}:
raise web.HTTPError(400, f"Content {hash_str!r} is invalid")
raise web.HTTPError(400, f"Hash argument {hash_str!r} is invalid. It must be '0' or '1'.")
require_hash = int(hash_str)

if not cm.allow_hidden and await ensure_async(cm.is_hidden(path)):
Expand Down

0 comments on commit b1871b3

Please sign in to comment.