diff --git a/atproto.py b/atproto.py index edff9fb..bf3050d 100644 --- a/atproto.py +++ b/atproto.py @@ -393,8 +393,8 @@ class ATProto(User, Protocol): copy = base_obj.get_copy(to_cls) assert copy copy_did, coll, rkey = parse_at_uri(copy) - assert copy_did == did - assert coll == type + assert copy_did == did, (copy_did, did) + assert coll == type, (coll, type) logger.info(f'Storing ATProto {action} {type} {rkey}: {dag_json.encode(record).decode()}') repo.apply_writes([Write(action=action, collection=type, rkey=rkey, diff --git a/ids.py b/ids.py index bc6e3fd..7ff359e 100644 --- a/ids.py +++ b/ids.py @@ -66,7 +66,7 @@ def translate_user_id(*, id, from_proto, to_proto): Returns: str: the corresponding id in ``to_proto`` """ - assert id and from_proto and to_proto + assert id and from_proto and to_proto, (id, from_proto, to_proto) assert from_proto.owns_id(id) is not False or from_proto.LABEL == 'ui', \ (id, from_proto.LABEL, to_proto.LABEL) @@ -141,7 +141,7 @@ def translate_handle(*, handle, from_proto, to_proto, enhanced): Returns: str: the corresponding handle in ``to_proto`` """ - assert handle and from_proto and to_proto + assert handle and from_proto and to_proto, (handle, from_proto, to_proto) assert from_proto.owns_handle(handle) is not False or from_proto.LABEL == 'ui' if from_proto == to_proto: @@ -188,7 +188,7 @@ def translate_object_id(*, id, from_proto, to_proto): Returns: str: the corresponding id in ``to_proto`` """ - assert id and from_proto and to_proto + assert id and from_proto and to_proto, (id, from_proto, to_proto) assert from_proto.owns_id(id) is not False or from_proto.LABEL == 'ui' # bsky.app profile URL to DID