I'm using protobuf.js with gRPC-web and running into a console stack trace when experimenting with this extension:
VM564:75 Uncaught TypeError: request.toObject is not a function
at newCallback (<anonymous>:75:30)
at Array.<anonymous> (index.js:66:1)
at Lc (index.js:59:1)
at qc.<anonymous> (index.js:57:1)
at Jb (index.js:35:1)
at O (index.js:34:1)
at Ac (index.js:48:1)
at push.679758.n.W (index.js:46:1)
at push.679758.n.R (index.js:46:1)
protobuf.js does have a toObject() function but it's declared on the type rather than the message, i.e. request.$type.toObject() works.
It would be awesome if this extension a) handled failures more gracefully than raising a type exception and b) either automatically or via a config hook supported other deserialization operations. For example with protobuf-ts you'd want to call request.toJson().
I'm using protobuf.js with gRPC-web and running into a console stack trace when experimenting with this extension:
protobuf.js does have a
toObject()function but it's declared on the type rather than the message, i.e.request.$type.toObject()works.It would be awesome if this extension a) handled failures more gracefully than raising a type exception and b) either automatically or via a config hook supported other deserialization operations. For example with protobuf-ts you'd want to call
request.toJson().