# Custom error message

**URL:** <https://forum.serverless.com/t/custom-error-message/6381>\
**Category:** Serverless Framework\
**Tags:** lambda, api-gateway\
**Created:** [November 6, 2018, 10:01pm UTC](https://forum.serverless.com/t/custom-error-message/6381 "2018-11-06T22:01:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurogami](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kurogami](https://forum.serverless.com/u/kurogami)\
**Post date:** [November 6, 2018, 10:01pm UTC](https://forum.serverless.com/t/custom-error-message/6381/1 "2018-11-06T22:01:20Z")

</div>

i’m looking for ways to return error messages on the API with lambda integration (not lambda-proxy integration) and want to eliminate `errorStackTrace` when using:

`callback(new Error('[400] Something is wrong here'))`

and want to return something like the response below and get a `400 Bad Request` header in Postman:

```auto
{
   message: "Something is wrong here"
}

```

How do you guys do it?

---

<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:** [November 8, 2018, 10:34am UTC](https://forum.serverless.com/t/custom-error-message/6381/2 "2018-11-08T10:34:15Z")

</div>

Have you tried adding a response template for the 400 status code? [https://serverless.com/framework/docs/providers/aws/events/apigateway/#responses](https://serverless.com/framework/docs/providers/aws/events/apigateway/#responses)
