edgedb-python
edgedb-python copied to clipboard
better query error reporting
This is what we print now
gel.errors.EdgeQLSyntaxError: Missing parentheses around statement used as an expression
┌─ query:14:33
│
14 │ with
│ ^^^^ error
we need to include more code above/below for this to make sense.
Ah! We should drop code the following and reuse the same _format_error():
https://github.com/geldata/gel-python/blob/a5c880ed95a69041fecbe1dede53b8b2c2f9ba2f/gel/_internal/_codegen/_generator.py#L178-L205