Replies: 2 comments 1 reply
-
next time please directly use triple-quotes, as can be seen in Mastering Markdown's
this is not a Error that typegoose throws, this is a native mongoose error typegoose errors can be identified by having as for the error you are having, your schema / model / class aside from that all, the error seems to be very long and convoluted (there is nothing typegoose can do about it), also i am not quite sure, but it seems like source-mapping is not activated or not behaving correctly (it needs to be enabled & outputted by tsc, and in nodejs either have module PS: i will move this issue to a discussion |
Beta Was this translation helpful? Give feedback.
-
Hey, thanks for the quick response. |
Beta Was this translation helpful? Give feedback.
-
Hey, I have a general question regarding error tracing.
In my current express app, I noticed that typegoose errors weren't printed in the stack correctly.
I prepared a reproduction here: https://github.com/Tobjoern/typegoose-virtual-autopop-bug.
The function 'doWork' throws an error in line 14, but this line is nowhere to be found in the error log.
It seems that it's lost in a bunch of error wrappers.
In larger projects it becomes increasingly hard to find out where the error occured exactly.
Am I handling the error incorrectly, or is this an issue with typegoose?
For comparison, I prepared an error in lines 19-21, when commented out, it reads:
TypeError: Cannot set property 'b' of null at anotherFunc (/home/tobias/coding/explorations/typegoose-virtual-autopop-bug/src/main.ts:21:8)
I'm looking forward to your answers.
Versions
Beta Was this translation helpful? Give feedback.
All reactions