Add new errorCode property to notebook errors to see if starting a notebook session failed. (#18617)

This commit is contained in:
Cory Rivera
2022-03-03 14:05:54 -08:00
committed by GitHub
parent 10ff8aa116
commit 0ab4752643
4 changed files with 9 additions and 5 deletions

View File

@@ -108,7 +108,7 @@ export class ExtHostNotebook implements ExtHostNotebookShape {
};
return details;
} catch (error) {
throw typeof (error) === 'string' ? new Error(error) : error;
throw typeof (error) === 'string' ? new Error(error) : Object.assign(error, { errorCode: error.response?.status }); // Add errorCode so that status info persists over RPC
}
});
}