fix(core): update

This commit is contained in:
Philipp Kunz 2019-09-01 15:39:08 +02:00
parent e7d8731fca
commit d1aa752c8e
2 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,11 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
response: null
}
});
const responseBody: T = response.body;
if (responseBody.error) {
console.log(responseBody.error.text);
console.log(responseBody.error.data);
}
return response.body.response;
}
}

View File

@ -33,6 +33,11 @@ export class TypedRouter {
console.log(`Cannot find method for ${typedHandler}`);
console.log(`Available methods are:`);
console.log(availableMethods);
typedRequest.error = {
text: 'There is no available method for this call on the server side',
data: {}
};
return typedRequest;
}
typedRequest = await typedHandler.addResponse(typedRequest);