@@ -310,7 +310,9 @@ def __init__(
310310 )
311311 if max_commit_time_ms is not None :
312312 if not isinstance (max_commit_time_ms , int ):
313- raise TypeError ("max_commit_time_ms must be an integer or None" )
313+ raise TypeError (
314+ f"max_commit_time_ms must be an integer or None, not { type (max_commit_time_ms )} "
315+ )
314316
315317 @property
316318 def read_concern (self ) -> Optional [ReadConcern ]:
@@ -902,7 +904,9 @@ def advance_cluster_time(self, cluster_time: Mapping[str, Any]) -> None:
902904 another `AsyncClientSession` instance.
903905 """
904906 if not isinstance (cluster_time , _Mapping ):
905- raise TypeError ("cluster_time must be a subclass of collections.Mapping" )
907+ raise TypeError (
908+ f"cluster_time must be a subclass of collections.Mapping, not { type (cluster_time )} "
909+ )
906910 if not isinstance (cluster_time .get ("clusterTime" ), Timestamp ):
907911 raise ValueError ("Invalid cluster_time" )
908912 self ._advance_cluster_time (cluster_time )
@@ -923,7 +927,9 @@ def advance_operation_time(self, operation_time: Timestamp) -> None:
923927 another `AsyncClientSession` instance.
924928 """
925929 if not isinstance (operation_time , Timestamp ):
926- raise TypeError ("operation_time must be an instance of bson.timestamp.Timestamp" )
930+ raise TypeError (
931+ f"operation_time must be an instance of bson.timestamp.Timestamp, not { type (operation_time )} "
932+ )
927933 self ._advance_operation_time (operation_time )
928934
929935 def _process_response (self , reply : Mapping [str , Any ]) -> None :
0 commit comments