File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ class PublicReaderSettings:
5454 update_token_interval : Union [int , float ] = 3600
5555
5656 def _init_message (self ) -> StreamReadMessage .InitRequest :
57+ if not isinstance (self .consumer , str ):
58+ raise TypeError ("Unsupported type for customer field: '%s'" % type (self .consumer ))
59+
5760 if isinstance (self .topic , list ):
5861 selectors = self .topic
5962 else :
@@ -65,7 +68,7 @@ def _init_message(self) -> StreamReadMessage.InitRequest:
6568 elif isinstance (selector , PublicTopicSelector ):
6669 pass
6770 else :
68- raise TypeError ("Value of %s not supported as topic selector " % type (selector ))
71+ raise TypeError ("Unsupported type for topic field: '%s' " % type (selector ))
6972
7073 return StreamReadMessage .InitRequest (
7174 topics_read_settings = list (map (PublicTopicSelector ._to_topic_read_settings , selectors )), # type: ignore
You can’t perform that action at this time.
0 commit comments