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
For common mistakes, like a malformed AQL query via db.query, or an operation like db.save on an edge collection missing _to or _from, the stack traces arangojs generates aren't coherent even with precaptureStackTraces.
I think that's because error responses from the server don't have the enhanced stack traces added to them? EG
Looking at this code now, I'm not sure when the stack traces even get added. I'm pretty sure the intention was to also augment the stack traces of HttpErrors and ArangoErrors but I think they're currently bypassing that logic entirely so this probably only affects network errors or something?
... but I think they're currently bypassing that logic entirely so this probably only affects network errors or something?
I believe this is correct: I've only ever seen precaptureStackTrace seem to work when I can't connect to my local ArangoDB instance because I haven't brought it up yet. Currently we're using a framework to capture and enhance ArangoDB errors locally via Error.captureStackTrace + dumping any provided AQL queries into the exception text, but it'd be great to see precatureStackTrace working across more error situations so we can drop that part from our codebase.
For common mistakes, like a malformed AQL query via
db.query
, or an operation likedb.save
on an edge collection missing_to
or_from
, the stack traces arangojs generates aren't coherent even with precaptureStackTraces.I think that's because error responses from the server don't have the enhanced stack traces added to them? EG
arangojs/src/connection.ts
Line 900 in 8fe4682
These kinds of errors account for almost all the errors I see, so it would be great if
precaptureStackTraces
enhanced these ones as well.The text was updated successfully, but these errors were encountered: