edgedb-js
edgedb-js copied to clipboard
Get line number causing an error in edgeql
Hi,
I see that the command line for edgeql supports line/col causing an error;
Any ways we can get this feedback from the js client?
It looks like that information is encoded in the attributes
field in the ErrorResponse
message documented here, and decoded in the JS client here, as a Map<number, Buffer>
, but not exposed in the error.
I've found the keys for the attrs
map here, however the comment says they're subject to change/depreciation, so maybe that's why the attrs are not officially exposed, but it seems easy enough to modify the client if you need that information.
If it's not flagged as stable yet then I'll prefer to wait. Can we keep this issue opened until it's officially available?
Yeah, we plan to implement Language Server Protocol for EdgeDB, so the current attributes are indeed unstable (and undocumented IIRC). If I may ask, what's your intended use case?
@1st1 Thanks for the info. I'm doing an ui to interact with edgedb, I want to be able to provide a visual feedback when an error occurs