Skip to content

Commit 0f7665c

Browse files
committed
Ignore EdgeDB.run in error stack trace. This puts the query source first.
1 parent 5a23dd3 commit 0f7665c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/edgedb/edgedb.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export class EdgeDB {
8585
return await this.executor.current.query(query, args);
8686
}
8787
} catch (e) {
88+
// Ignore this call in stack trace. This puts the actual query as the first.
89+
e.stack = e.stack!.replace(/^\s+at EdgeDB\.run.+\n/m, '');
90+
8891
if (ExclusivityViolationError.is(e)) {
8992
throw ExclusivityViolationError.cast(e);
9093
}

0 commit comments

Comments
 (0)