From 656b75032155072e8a7410bc46ff7b1f39f23f8d Mon Sep 17 00:00:00 2001 From: Casey Burns Date: Sun, 11 Oct 2015 11:09:09 +1300 Subject: [PATCH] Display AWS API error message on failure --- tasks/lambda_deploy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/lambda_deploy.js b/tasks/lambda_deploy.js index 75ef7c8..1a75307 100644 --- a/tasks/lambda_deploy.js +++ b/tasks/lambda_deploy.js @@ -63,7 +63,8 @@ module.exports = function (grunt) { if(err.statusCode === 404) { grunt.fail.warn('Unable to find lambda function ' + deploy_function + ', verify the lambda function name and AWS region are correct.'); } else { - grunt.fail.warn('AWS API request failed, check your AWS credentials, region and permissions are correct.'); + grunt.log.error('AWS API request failed with ' + err.statusCode + ' - ' + err); + grunt.fail.warn('Check your AWS credentials, region and permissions are correct.'); } }