diff --git a/.gitignore b/.gitignore index 1077a8c48..d1ea9dbfe 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ appium-e2e-test temp-appium .env src/public/* -docs/reference \ No newline at end of file +docs/reference +.npmrc \ No newline at end of file diff --git a/src/modules b/src/modules index 6abb2907f..cd2684fb9 160000 --- a/src/modules +++ b/src/modules @@ -1 +1 @@ -Subproject commit 6abb2907fcbbb8bbc01defafa46fe350f618a041 +Subproject commit cd2684fb9612825def4b67cc8603e3feb75cf94a diff --git a/src/proxy/wd-command-proxy.ts b/src/proxy/wd-command-proxy.ts index 84f36d153..7f6949db6 100644 --- a/src/proxy/wd-command-proxy.ts +++ b/src/proxy/wd-command-proxy.ts @@ -137,7 +137,12 @@ export function wrapRequestWithMiddleware(options: { for (const middlware of middlewares) { next = ((_next) => async () => { if (_.isFunction(middlware)) { - return await middlware(request, response, _next); + try { + return middlware(request, response, _next); + } catch (e) { + log.error('Error executing middleware:'); + log.error(e); + } } })(next); }