Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Because it did not match the document. https://docs.aws.amazon.com/la…
Browse files Browse the repository at this point in the history
  • Loading branch information
mashiike committed Jun 29, 2020
1 parent 33b46b6 commit 85fc2df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sendInitError () {
ERROR_MESSAGE=$1
ERROR_TYPE=$2
ERROR="{\"errorMessage\": \"$ERROR_MESSAGE\", \"errorType\": \"$ERROR_TYPE\"}"
curl -sS -X POST -d "$ERROR" "http://${AWS_LAMBDA_RUNTIME_API}/${RUNTIME_PATH}/init/error" > /dev/null
curl -sS -X POST -d "$ERROR" --header "Lambda-Runtime-Function-Error-Type: Unhandled" "http://${AWS_LAMBDA_RUNTIME_API}/${RUNTIME_PATH}/init/error" > /dev/null
}

# Send runtime error to Lambda API
Expand All @@ -24,7 +24,8 @@ sendRuntimeError () {
ERROR_TYPE=$3
STACK_TRACE=$4
ERROR="{\"errorMessage\": \"$ERROR_MESSAGE\", \"errorType\": \"$ERROR_TYPE\", \"stackTrace\": \"$STACK_TRACE\"}"
curl -sS -X POST -d "$ERROR" "http://${AWS_LAMBDA_RUNTIME_API}/${RUNTIME_PATH}/invocation/${REQUEST_ID}/error" > /dev/null
curl -sS -X POST -d "$ERROR" --header "Lambda-Runtime-Function-Error-Type: Unhandled" "http://${AWS_LAMBDA_RUNTIME_API}/${RUNTIME_PATH}/invocation/${REQUEST_ID}/error" > /dev/null

}

# Send successful response to Lambda API
Expand Down

0 comments on commit 85fc2df

Please sign in to comment.