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
I'm pretty sure this is what causes my returned errors to look like this (note the meaningless "locations" value):
"errors": [
{
"message": "The string I passed to UserError",
"locations": [
{
"line": 2,
"column": 3
}
]
}
]
Obviously the locations bit doesn't hurt anything (as without a filename or a complete stack you can't really do anything with the line numbers) ... but at the same time, in a library that's all about hiding unnecessary information from the user, it's strange that I'm forced to send this unnecessary information to the user anytime I want to provide error information that's visible client-side.
Would it be possible to add an argument to UserError to let one specify "don't add the locations to this error"? Or better yet, maybe just make that the default behavior, because line numbers without files will never be useful to anyone?
The text was updated successfully, but these errors were encountered:
In the definition of
UserError
it does:I'm pretty sure this is what causes my returned errors to look like this (note the meaningless "locations" value):
Obviously the locations bit doesn't hurt anything (as without a filename or a complete stack you can't really do anything with the line numbers) ... but at the same time, in a library that's all about hiding unnecessary information from the user, it's strange that I'm forced to send this unnecessary information to the user anytime I want to provide error information that's visible client-side.
Would it be possible to add an argument to
UserError
to let one specify "don't add the locations to this error"? Or better yet, maybe just make that the default behavior, because line numbers without files will never be useful to anyone?The text was updated successfully, but these errors were encountered: