We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7424dfa commit 4bb9d54Copy full SHA for 4bb9d54
src/core/exception/exception.normalizer.ts
@@ -98,6 +98,22 @@ export class ExceptionNormalizer {
98
};
99
}
100
101
+ // Again, dig deep here to find connection errors.
102
+ // These would be the root problem that we'd want to expose.
103
+ const edgeError = exs.find(
104
+ (e): e is Edge.EdgeDBError => e instanceof Edge.EdgeDBError,
105
+ );
106
+ if (
107
+ edgeError &&
108
+ (edgeError instanceof Edge.AvailabilityError ||
109
+ edgeError instanceof Edge.ClientConnectionError)
110
+ ) {
111
+ return {
112
+ codes: this.errorToCodes(ex),
113
+ message: 'Failed to connect to CORD database',
114
+ };
115
+ }
116
+
117
if (ex instanceof ExclusivityViolationError) {
118
ex = DuplicateException.fromDB(ex, context);
119
} else if (ex instanceof Edge.EdgeDBError) {
0 commit comments