You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When store_object fails, the calling methods log the relevant errors as expected, but when the exception reaches store_object, the actual cause/message is lost (only the exception type is displayed at this time). Even though the appropriate exceptions/errors are logged, this is a bit confusing (and cause misunderstanding).
Revise exception messaging (minimize amount of errors shown via logging levels to reduce confusion?) and ensure store_object shows an appropriate exception message when an object fails to be stored.
Example:
2024-05-21 17:34:59 - ERROR - FileHashStore - _verify_object_information: Hex digest and checksum do not match - file not stored for pid: urn:uuid:018c0136-e22f-4319-b109-140c99afd7c7. Algorithm: md5. Checksum provided: null != HexDigest: 2fc94682032f18f380d042e5f88a517c. Tmp file (/home/mok/testing/knbvm_hashstorecp/objects/tmp/tmpdzxb37pq) deleted.
2024-05-21 17:34:59 - ERROR - FileHashStore - _move_and_get_checksums: Object exists but cannot be verified (validation error): /home/mok/testing/knbvm_hashstorecp/objects/ef/23/eb/20185a54a5dc3e5b5b96d97f158aa5f639b52598cdcc8feaf5df508e15, deleting temporary file. Error: FileHashStore - _verify_object_information: Hex digest and checksum do not match - file not stored for pid: urn:uuid:018c0136-e22f-4319-b109-140c99afd7c7. Algorithm: md5. Checksum provided: null != HexDigest: 2fc94682032f18f380d042e5f88a517c. Tmp file (/home/mok/testing/knbvm_hashstorecp/objects/tmp/tmpdzxb37pq) deleted.
2024-05-21 17:34:59 - ERROR - FileHashStore - store_object: failed to store object for pid: urn:uuid:018c0136-e22f-4319-b109-140c99afd7c7. Unexpected err=ValueError(), type(err)=<class 'ValueError'>
The text was updated successfully, but these errors were encountered:
2024-05-22 17:10:49 - ERROR - FileHashStore - store_object: failed to store object for pid: urn:uuid:19aeb87b-ef5e-4f98-996a-0dd02adcad9f. Reference files will not be created or tagged. PidObjectMetadataError: FileHashStore - _move_and_get_checksums: Object already exists for pid: urn:uuid:19aeb87b-ef5e-4f98-996a-0dd02adcad9f , deleting temp file. Reference files will not be created and/or tagged due to an issue with the supplied pid object metadata. FileHashStore - _verify_object_information: Hex digest and checksum do not match - file not stored for pid: urn:uuid:19aeb87b-ef5e-4f98-996a-0dd02adcad9f. Algorithm: sha256. Checksum provided: a553be6d4597e821d886ff63fc5922dd4c56f0be28441f43422675c4bef31f8d != HexDigest: dc08a96bc09f8489605d4a6fd9ff9ccb31f07a67f25682c27ebc92fbdf8cb6e3. Tmp file (/home/mok/testing/knbvm_python/objects/tmp/tmpjcbydo4c) deleted.
When
store_object
fails, the calling methods log the relevant errors as expected, but when the exception reachesstore_object
, the actual cause/message is lost (only the exception type is displayed at this time). Even though the appropriate exceptions/errors are logged, this is a bit confusing (and cause misunderstanding).Revise exception messaging (minimize amount of errors shown via logging levels to reduce confusion?) and ensure
store_object
shows an appropriate exception message when an object fails to be stored.Example:
The text was updated successfully, but these errors were encountered: