# How to debug "internal server error"

**URL:** <https://forum.serverless.com/t/how-to-debug-internal-server-error/4980>\
**Category:** Serverless Framework\
**Created:** [July 5, 2018, 12:55pm UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980 "2018-07-05T12:55:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![appzone](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/appzone/32/2206_2.png) [@appzone](https://forum.serverless.com/u/appzone)\
**Post date:** [July 5, 2018, 12:55pm UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980/1 "2018-07-05T12:55:34Z")

</div>

How can we debug “internal server error”  
i have check on AWS logging, no error showing

i also have put JSON stringify

callback(null, {  
statusCode: 200,  
body: JSON.stringify(banner)  
})

thanks

---

<div class="post-metadata">

**Author:** ![buggy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/buggy/32/177_2.png) [@buggy](https://forum.serverless.com/u/buggy)\
**Post date:** [July 5, 2018, 10:59pm UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980/2 "2018-07-05T22:59:13Z")

</div>

No log typically means your Lambda isn’t being invoked. You can try invoking it manually from the console using a test event to see if that creates a log entry. If it creates a log entry that way but not via the API GW then you’re probably using the wrong URL to trigger it.

---

<div class="post-metadata">

**Author:** ![appzone](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/appzone/32/2206_2.png) [@appzone](https://forum.serverless.com/u/appzone)\
**Post date:** [July 9, 2018, 7:43am UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980/3 "2018-07-09T07:43:20Z")

</div>

hi @buggy thanks for the response

there is a log. but there is no error log.

and if i invoke via test event it said “timeout after 10 seconds”.  
i try increase the timeout. but it keep get “timeout after xx seconds”

it look the callback is not called / triggered.

any suggestion to check?

---

<div class="post-metadata">

**Author:** ![appzone](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/appzone/32/2206_2.png) [@appzone](https://forum.serverless.com/u/appzone)\
**Post date:** [July 9, 2018, 7:44am UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980/4 "2018-07-09T07:44:24Z")

</div>

if i am using same code (copy paste) to other function its working normally.

---

<div class="post-metadata">

**Author:** ![buggy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/buggy/32/177_2.png) [@buggy](https://forum.serverless.com/u/buggy)\
**Post date:** [July 9, 2018, 7:52am UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980/5 "2018-07-09T07:52:11Z")

</div>

Are you using the Node 8.10 runtime with an async handler?

If you are then remove the `async`. I wrote a blog post about [How async Lambda handlers work in Node 8.10](https://www.richdevelops.dev/how-async-lambda-handlers-work-in-node-810) because it’s a common mistake that could cause something like this.

---

<div class="post-metadata">

**Author:** ![appzone](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/appzone/32/2206_2.png) [@appzone](https://forum.serverless.com/u/appzone)\
**Post date:** [July 9, 2018, 8:11am UTC](https://forum.serverless.com/t/how-to-debug-internal-server-error/4980/6 "2018-07-09T08:11:33Z")

</div>

yes i am using async. but not sure node version

i will check and test first

thank you very much for the help
