Skip to content

Commit

Permalink
v2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dherault committed Mar 31, 2016
1 parent aa70463 commit 218403c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-offline",
"version": "2.2.2",
"version": "2.2.3",
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
"main": "src/index.js",
"scripts": {},
Expand Down
13 changes: 8 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,7 @@ module.exports = S => {

/* REQUEST TEMPLATE PROCESSING (event population) */

if (!requestTemplate) {
console.log();
serverlessLog(`Warning: no template found for '${contentType}' content-type.`);
console.log();
} else {
if (requestTemplate) {
try {
debugLog('_____ REQUEST TEMPLATE PROCESSING _____');
const velocityContext = createVelocityContext(request, this.velocityContextOptions, request.payload || {});
Expand All @@ -317,7 +313,14 @@ module.exports = S => {

// We create the context, its callback (context.done/succeed/fail) will send the HTTP response
const lambdaContext = createLambdaContext(fun, (err, data) => {
if (this.contextWasCalled) {
console.log();
serverlessLog('Warning: context.done called twice!');
console.log();
return;
}
this.contextWasCalled = true;

debugLog('_____ HANDLER RESOLVED _____');

if (this.timeout && this.timeout._called) return;
Expand Down

0 comments on commit 218403c

Please sign in to comment.