fix(core): update

This commit is contained in:
Philipp Kunz 2019-08-31 14:11:56 +02:00
parent e81b248181
commit f54dfb5bb5

View File

@ -25,6 +25,16 @@ export class TypedRouter {
return handler.method === typedRequest.method;
});
if (!typedHandler) {
const availableMethods: string[] = [];
this.handlerMap.forEach(async (handler) => {
availableMethods.push(handler.method);
});
console.log(`Cannot find method for ${typedHandler}`);
console.log(`Available methods are:`);
console.log(availableMethods);
}
typedRequest = await typedHandler.addResponse(typedRequest);
return typedRequest;
}