We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36a96b1 commit c3411a1Copy full SHA for c3411a1
README.md
@@ -48,9 +48,13 @@ exports.handler = router.handler(
48
}
49
],
50
debug: true,
51
+ // custom mapping of thrown errors to http response code error:
52
+ // the action can throw an object like
53
+ // "throw {reason: 'NotFound', message: 'object id not found'}"
54
+ // the http response then contains the configured value as response code and the message as the body
55
errorMapping: {
56
'NotFound': 404,
- 'RequestError': 500
57
+ 'ServerError': 500
58
59
},
60
// for handling calls initiated from AWS-SNS:
0 commit comments