Skip to content

Commit

Permalink
Improve logging statements for 'find_object' by including pid value
Browse files Browse the repository at this point in the history
  • Loading branch information
doulikecookiedough committed May 22, 2024
1 parent b3a612c commit f238df5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hashstore/filehashstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,16 @@ def find_object(self, pid):
err_msg = (
"FileHashStore - find_object: pid refs file exists with cid: "
+ pid_refs_cid
+ " for pid: "
+ pid
+ f", but is missing from cid refs file: {cid_ref_abs_path}"
)
logging.error(err_msg)
raise PidNotFoundInCidRefsFile(err_msg)
else:
err_msg = (
f"FileHashStore - find_object: pid refs file exists with cid: {pid_refs_cid}"
+ f", but cid refs file not found: {cid_ref_abs_path}"
+ f", but cid refs file not found: {cid_ref_abs_path} for pid: {pid}"
)
logging.error(err_msg)
raise CidRefsDoesNotExist(err_msg)
Expand Down

0 comments on commit f238df5

Please sign in to comment.