# Show Error message from @custom API response in GraphQL response

**URL:** <https://discuss.dgraph.io/t/show-error-message-from-custom-api-response-in-graphql-response/7222>\
**Category:** GraphQL\
**Tags:** graphql\
**Created:** [June 16, 2020, 5:03am UTC](https://discuss.dgraph.io/t/show-error-message-from-custom-api-response-in-graphql-response/7222 "2020-06-16T05:03:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianhunter](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@adrianhunter](https://discuss.dgraph.io/u/adrianhunter)\
**Post date:** [June 16, 2020, 5:03am UTC](https://discuss.dgraph.io/t/show-error-message-from-custom-api-response-in-graphql-response/7222/1 "2020-06-16T05:03:43Z")

</div>

I only get a generic Response in GraphQL when throwing a 4xx Error in my custom API, how can show the Error message in the GraphQL response?

---

<div class="post-metadata">

**Author:** ![michaelcompton](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/michaelcompton/32/1774_2.png) [@michaelcompton](https://discuss.dgraph.io/u/michaelcompton)\
**Post date:** [June 17, 2020, 6:00am UTC](https://discuss.dgraph.io/t/show-error-message-from-custom-api-response-in-graphql-response/7222/2 "2020-06-17T06:00:12Z")

</div>

Hi thanks for the question.

Can you give a quick example of your 4xx error and what error message you’d like the GraphQL server to return.

tagging in @JatinDevDG

---

<div class="post-metadata">

**Author:** ![adrianhunter](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@adrianhunter](https://discuss.dgraph.io/u/adrianhunter)\
**Post date:** [June 18, 2020, 5:04am UTC](https://discuss.dgraph.io/t/show-error-message-from-custom-api-response-in-graphql-response/7222/3 "2020-06-18T05:04:38Z")

</div>

Hey, I got it working when using a custom graphql endpoint, which works better for anyway, as I can inspect the actual query.
