mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add new errorCode property to notebook errors to see if starting a notebook session failed. (#18617)
This commit is contained in:
@@ -104,12 +104,14 @@ export function transformErrorForSerialization(error: any): any;
|
||||
export function transformErrorForSerialization(error: any): any {
|
||||
if (error instanceof Error) {
|
||||
let { name, message } = error;
|
||||
let errorCode = (<any>error).errorCode; // {{SQL CARBON EDIT}} Add error code to retain more information
|
||||
const stack: string = (<any>error).stacktrace || (<any>error).stack;
|
||||
return {
|
||||
$isError: true,
|
||||
name,
|
||||
message,
|
||||
stack
|
||||
stack,
|
||||
errorCode
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -445,6 +445,7 @@ export class RPCProtocol extends Disposable implements IRPCProtocol {
|
||||
err.name = value.name;
|
||||
err.message = value.message;
|
||||
err.stack = value.stack;
|
||||
err.errorCode = value.errorCode; // {{SQL CARBON EDIT}} Include custom error code
|
||||
} else {
|
||||
err = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user