Skip to content

Commit 7f82c15

Browse files
authored
[jsonrpc] fix missing data fields (#18304)
1 parent e667765 commit 7f82c15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/gitpod-protocol/src/messaging/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class ApplicationError extends Error {
2222
}
2323

2424
export namespace ApplicationError {
25-
export function hasErrorCode(e: any): e is Error & { code: ErrorCode } {
25+
export function hasErrorCode(e: any): e is Error & { code: ErrorCode; data?: any } {
2626
return e && e.code !== undefined;
2727
}
2828
}

components/server/src/websocket/websocket-connection-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class GitpodJsonRpcProxyFactory<T extends object> extends JsonRpcProxyFactory<T>
434434
message: e.message,
435435
},
436436
);
437-
throw new ResponseError(e.code, e.message);
437+
throw new ResponseError(e.code, e.message, e.data);
438438
} else {
439439
TraceContext.setError(ctx, e); // this is a "real" error
440440

0 commit comments

Comments
 (0)