Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3862

Answered: Rebex on aws lambda exception. Why?

$
0
0

Hi,

If you are using Lambda Proxy integration, you are responsible for returning a proper response whether its a success or an exception.

You can do so by catching the exception.

def handler(event, context):
try:
return {
'statusCode': 200,
'body': json.dumps({
'hello': 'world'
})
}
except BadRequestError:
return {
'statusCode': 400,
'body': json.dumps({
'error': 'Bad Request Error'
})
}
except:
return {
'statusCode': 500,
'body': json.dumps({
'error': 'Internal Server Error'
})
}

Thanks
Alison


Viewing all articles
Browse latest Browse all 3862

Trending Articles