You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have a mongoose schema that I had added a virtual to translate a cron expression into a human-readable string using your package. Initially, I had just set virtuals to true at the schema level. That did lead to an error in one method where I was excluding my cron interval field (which the virtual translates from). It took me a good hour to figure that out however, as the error message you output only says "Expression is empty"
May I suggest that you should add some extra verbage on where the error is coming from and why? For example: "cRonstrue Error: Expression passed to <method> is empty"
or something to that effect. That way at least we know where the error is coming from.
The text was updated successfully, but these errors were encountered:
Are you suggesting that the error message itself contain the name of the package "cRonstrue"? If so, I'd rather not hardcode the package name in the error messages as the package name might change at some point in the future. It sounds like you may be able to add some additional logging info in your system to pinpoint the source of an error.
dont need to hardcode the package name. im assuming you have a config file somewhere or you can import your package.json and pull the name of the package from there. Don't even need the package name; that was just an example. Im just saying that "Expression is empty" was a frustratingly vague error message that provided no context as to where it was coming from.
Hi! I have a mongoose schema that I had added a virtual to translate a cron expression into a human-readable string using your package. Initially, I had just set virtuals to true at the schema level. That did lead to an error in one method where I was excluding my cron interval field (which the virtual translates from). It took me a good hour to figure that out however, as the error message you output only says
"Expression is empty"
May I suggest that you should add some extra verbage on where the error is coming from and why? For example:
"cRonstrue Error: Expression passed to <method> is empty"
or something to that effect. That way at least we know where the error is coming from.
The text was updated successfully, but these errors were encountered: