Node SDK: allow to construct ExtendedIncomingMessage
and ExtendedResponse
in order to send logs from everywhere in project
#915
Labels
node
Issues related to our Node SDK
I noticed that Node SDK support only the requests made from frontend to a backend's controller.
But if you send HTTP requests from your backend to another place in the Internet, it becomes impossible to send ReadMe logs.
For example, I am using Nest with underlying Fastify backend and try to intercept backend's requests via this code:
and
OrdAuthResponseInterceptor()
is just a function:And it expectedly fails with error like:
That's because I have provided wrong object, masked as
ExtendedIncomingMessage
andExtendedResponse
- but I don't have other choice. Yourreadme.log()
method expectsExtendedIncomingMessage
andExtendedResponse
for request and response accordingly.I guess I cannot construct
ExtendedIncomingMessage
andExtendedResponse
because they are too complicated.Can you please allow us to send simple props like
body
,status
,statusText
andpayload
when sending logs?The text was updated successfully, but these errors were encountered: