# Serverless-offline: Throwing exception in nodejs doesn't trigger API Gateway response

**URL:** <https://forum.serverless.com/t/serverless-offline-throwing-exception-in-nodejs-doesnt-trigger-api-gateway-response/12666>\
**Category:** Serverless Framework\
**Tags:** lambda, api-gateway\
**Created:** [September 25, 2020, 9:02am UTC](https://forum.serverless.com/t/serverless-offline-throwing-exception-in-nodejs-doesnt-trigger-api-gateway-response/12666 "2020-09-25T09:02:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcoundon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rcoundon/32/4575_2.png) [@rcoundon](https://forum.serverless.com/u/rcoundon)\
**Post date:** [September 25, 2020, 9:02am UTC](https://forum.serverless.com/t/serverless-offline-throwing-exception-in-nodejs-doesnt-trigger-api-gateway-response/12666/1 "2020-09-25T09:02:24Z")

</div>

When running in AWS, an async lambda-proxy function that throws an exception causes a response to be sent back to the client with HTTP 500.  
When doing the same in serverless-offline, this doesn’t happen and the request/response never completes until a timeout occurs. Is there something I need to do in configuration or code to make this work in serverless-offline or is this a bug?

---

<div class="post-metadata">

**Author:** ![rcoundon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rcoundon/32/4575_2.png) [@rcoundon](https://forum.serverless.com/u/rcoundon)\
**Post date:** [October 5, 2020, 7:19am UTC](https://forum.serverless.com/t/serverless-offline-throwing-exception-in-nodejs-doesnt-trigger-api-gateway-response/12666/2 "2020-10-05T07:19:54Z")

</div>

Sorry to bump this, just curious if someone else can try this out before I go and create a github issue

---

<div class="post-metadata">

**Author:** ![roy-firman](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/roy-firman/32/7006_2.png) [@roy-firman](https://forum.serverless.com/u/roy-firman)\
**Post date:** [August 15, 2022, 6:14am UTC](https://forum.serverless.com/t/serverless-offline-throwing-exception-in-nodejs-doesnt-trigger-api-gateway-response/12666/3 "2022-08-15T06:14:19Z")

</div>

Got into the same issue, did you solve it somehow?  
Anyone else that knows this and can explain?

---

<div class="post-metadata">

**Author:** ![rcoundon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rcoundon/32/4575_2.png) [@rcoundon](https://forum.serverless.com/u/rcoundon)\
**Post date:** [August 15, 2022, 9:14am UTC](https://forum.serverless.com/t/serverless-offline-throwing-exception-in-nodejs-doesnt-trigger-api-gateway-response/12666/4 "2022-08-15T09:14:47Z")

</div>

Hi - Sorry I’ve moved away from serverless framework to use sst.dev instead
