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 e6dc29f commit 3849265Copy full SHA for 3849265
src/common/utils.ts
@@ -213,11 +213,11 @@ export function getServiceURL(gitpodHost: string): string {
213
export class WrapError extends Error {
214
code: string | undefined;
215
constructor(msg: string, err: any, code?: string) {
216
- super(msg);
217
- if (err instanceof Error) {
+ const isErr = err instanceof Error;
+ super(isErr ? `${msg}: ${err.message}` : msg);
218
+ if (isErr) {
219
this.name = err.name;
- this.stack = err.stack;
220
- this.message = `${msg}: ${err.message}`;
+ this.stack = this.stack + '\n\n' + err.stack;
221
}
222
this.code = code ? code : err.code;
223
0 commit comments