Skip to content

Commit b786da1

Browse files
authored
[server] remove gitpod support mention from errors (#19045)
1 parent df7929c commit b786da1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

components/server/src/api/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export class API {
180180
if (reason != err && err.code === Code.Internal) {
181181
log.error("public api: unexpected internal error", reason);
182182
err = new ConnectError(
183-
`Oops! Something went wrong. Please quote the request ID ${logContext.requestId} when reaching out to Gitpod Support.`,
183+
`Oops! Something went wrong.`,
184184
Code.Internal,
185185
// pass metadata to preserve the application error
186186
err.metadata,

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ class GitpodJsonRpcProxyFactory<T extends object> extends JsonRpcProxyFactory<T>
446446
observeAPICallsDuration(method, 200, timer());
447447
return result;
448448
} catch (e) {
449-
const requestIdMessage = ` If this error is unexpected, please quote the request ID '${requestId}' when reaching out to Gitpod Support.`;
449+
// TODO(ak) this guard does not look correct
450+
// it checks for a presence of `code`, but other errors also may have code, like all Node.js errors: https://nodejs.org/api/errors.html#errorcode
451+
// instanceof ApplicationError should be more appropriate here
450452
if (ApplicationError.hasErrorCode(e)) {
451453
increaseApiCallCounter(method, e.code);
452454
observeAPICallsDuration(method, e.code, timer());
@@ -463,13 +465,13 @@ class GitpodJsonRpcProxyFactory<T extends object> extends JsonRpcProxyFactory<T>
463465
message: e.message,
464466
},
465467
);
466-
throw new ResponseError(e.code, e.message + requestIdMessage, e.data);
468+
throw new ResponseError(e.code, e.message, e.data);
467469
} else {
468470
TraceContext.setError(ctx, e); // this is a "real" error
469471

470472
const err = new ApplicationError(
471473
ErrorCodes.INTERNAL_SERVER_ERROR,
472-
`Internal server error: '${e.message}'` + requestIdMessage,
474+
`Internal server error: '${e.message}'`,
473475
);
474476
increaseApiCallCounter(method, err.code);
475477
observeAPICallsDuration(method, err.code, timer());

0 commit comments

Comments
 (0)