mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
better protect against failing custom request
This commit is contained in:
@@ -157,10 +157,10 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
|
||||
const process = this.debugService.getModel().getProcesses().filter(p => p.getId() === sessionId).pop();
|
||||
if (process) {
|
||||
return process.session.custom(request, args).then(response => {
|
||||
if (response.success) {
|
||||
if (response && response.success) {
|
||||
return response.body;
|
||||
} else {
|
||||
return TPromise.wrapError(new Error(response.message));
|
||||
return TPromise.wrapError(new Error(response ? response.message : 'custom request failed'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user