lambda-serverless-api
Advanced tools
Comparing version 11.1.0 to 11.1.1
@@ -42,3 +42,3 @@ import get from 'lodash.get'; | ||
if (resp === null) { | ||
throw ApiErrorFn('Method / Route not allowed', 403); | ||
throw ApiErrorFn('Method / Route not allowed', 403, 99008); | ||
} | ||
@@ -45,0 +45,0 @@ return resp; |
@@ -86,11 +86,16 @@ import assert from 'assert'; | ||
const signature = this.signature | ||
.map((p) => { | ||
if (p === '$ROUTE') { | ||
const matchedRoute = router.recognize(event.httpMethod, get(event, 'path', '')); | ||
return matchedRoute ? matchedRoute[0].handler.route.split(' ')[1] : get(message, 'event.path'); | ||
} | ||
return get(message, p); | ||
}) | ||
.filter((e) => !!e).join(' '); | ||
let signature; | ||
if (message?.response?.statusCode === 403 && message?.response?.body?.messageId === 99008) { | ||
signature = `403: ${message?.response?.body?.message}`; | ||
} else { | ||
signature = this.signature | ||
.map((p) => { | ||
if (p === '$ROUTE') { | ||
const matchedRoute = router.recognize(event.httpMethod, get(event, 'path', '')); | ||
return matchedRoute ? matchedRoute[0].handler.route.split(' ')[1] : get(message, 'event.path'); | ||
} | ||
return get(message, p); | ||
}) | ||
.filter((e) => !!e).join(' '); | ||
} | ||
assert(signature !== ''); | ||
@@ -97,0 +102,0 @@ |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "11.1.0", | ||
"version": "11.1.1", | ||
"scripts": { | ||
@@ -44,0 +44,0 @@ "clean": "rm -rf lib", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101837
2989