Added 'x-amzn-ErrorType' in return header from lambda:get_function for missing function
This commit is contained in:
parent
7719ac76a3
commit
b4c9b76ca9
@ -295,7 +295,7 @@ class LambdaResponse(BaseResponse):
|
|||||||
code["Configuration"]["FunctionArn"] += ":$LATEST"
|
code["Configuration"]["FunctionArn"] += ":$LATEST"
|
||||||
return 200, {}, json.dumps(code)
|
return 200, {}, json.dumps(code)
|
||||||
else:
|
else:
|
||||||
return 404, {}, "{}"
|
return 404, {"x-amzn-ErrorType": "ResourceNotFoundException"}, "{}"
|
||||||
|
|
||||||
def _get_aws_region(self, full_url):
|
def _get_aws_region(self, full_url):
|
||||||
region = self.region_regex.search(full_url)
|
region = self.region_regex.search(full_url)
|
||||||
|
@ -455,7 +455,7 @@ def test_get_function():
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Test get function when can't find function name
|
# Test get function when can't find function name
|
||||||
with assert_raises(ClientError):
|
with assert_raises(conn.exceptions.ResourceNotFoundException):
|
||||||
conn.get_function(FunctionName="junk", Qualifier="$LATEST")
|
conn.get_function(FunctionName="junk", Qualifier="$LATEST")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user