提交 8eae3a33 编写于 作者: A Andre Weinand

better protect against failing custom request

上级 183c93c0
......@@ -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'));
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册