# Where to get error Stacktrace?

**URL:** <https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768>\
**Category:** GraphQL\
**Tags:** status:accepted, kind:bug, ticket:created\
**Created:** [October 5, 2020, 8:16am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768 "2020-10-05T08:16:34Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![brmaeji](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@brmaeji](https://discuss.dgraph.io/u/brmaeji)\
**Post date:** [October 5, 2020, 8:16am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/1 "2020-10-05T08:16:34Z")

</div>

While using the graphic query interface I got this msg:

```auto
  "errors": [
    {
      "message": "Internal Server Error - a panic was trapped. This indicates a bug in the GraphQL server. A stack trace was logged. Please let us know by filing an issue with the stack trace."
    }
  ]
} 

```

where can I check this stacktrace?

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [October 5, 2020, 8:41am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/2 "2020-10-05T08:41:58Z")

</div>

It should be there as a panic in the `dgraph alpha` logs`. So check the logs and share with his so that we can look into it.

---

<div class="post-metadata">

**Author:** ![brmaeji](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@brmaeji](https://discuss.dgraph.io/u/brmaeji)\
**Post date:** [October 5, 2020, 9:05am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/3 "2020-10-05T09:05:25Z")

</div>

I’m not sure if it is possible on the SlashQL deployment. I’m trying to find it on the slash dashboard and also with the slash CLI but didnt get it yet.

The references I’ve found on the docs for logging seem to work only for deployed dgraph versions but not for the hosted version (slash).

Maybe I missed something. If you can share some document about it would be great.

Thanks!

---

<div class="post-metadata">

**Author:** ![Neeraj](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/neeraj/32/3104_2.png) [@Neeraj](https://discuss.dgraph.io/u/Neeraj)\
**Post date:** [October 5, 2020, 2:52pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/4 "2020-10-05T14:52:23Z")

</div>

Hey @brmaeji,

This feature isn’t supported in slash yet. I’m not able to see any deployments created by you.  
Can you please try to create another deployment, and notify me about it? I’ll be able to provide you the logs for that one.

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [October 9, 2020, 10:31am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/6 "2020-10-09T10:31:47Z")

</div>

Hey @brmaeji

Apologies for taking a few days to get back to you. We were able to get the logs and this is indeed a bug. We are trying to reproduce this on our end. Would it be possible for you to share the mutation which caused this and if possible the type definition of the nodes that you were trying to modify?

Once we are able to reproduce this, we should have a fix in a day or two.

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [October 13, 2020, 11:37am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/8 "2020-10-13T11:37:17Z")

</div>

hey @brmaeji

Would it be possible for you to share the mutation which caused this and if possible the type definition of the nodes that you were trying to modify?

---

<div class="post-metadata">

**Author:** ![brmaeji](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@brmaeji](https://discuss.dgraph.io/u/brmaeji)\
**Post date:** [October 13, 2020, 12:00pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/9 "2020-10-13T12:00:30Z")

</div>

hey @pawan, I’m trying to find it but I think it got lost in some notes file I overwrote with my last tests… sorry about that. I’ll try to reproduce it - I’m almost sure it was a GraphQL query that used both `set` and `remove` on the same property and that was the problem.

---

<div class="post-metadata">

**Author:** ![eianc](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/eianc/32/5675_2.png) [@eianc](https://discuss.dgraph.io/u/eianc)\
**Post date:** [December 10, 2020, 8:22pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/10 "2020-12-10T20:22:54Z")

</div>

Hey @pawan,

I got the same issue, I’m using Slash GraphQL too and these kind of mutations are failing with the same error message

```auto
Internal Server Error - a panic was trapped. This indicates a bug in the GraphQL server. A stack trace was logged. Please let us know by filing an issue with the stack trace.

```

My mutations are:

```auto
mutation MyMutation {
  updateSubject(input: {filter: {id: "0x4"}, set: {topics: {name: "Respiration"}}}) {
    subject {
      name
      topics {
        name
      }
    }
  }
}

```

or this one

```auto
mutation MyMutation {
  updateSubject(input: {filter: {id: "0x4"}, set: {name: "Biology KS3"}}) {
    subject {
      name
      topics {
        name
      }
    }
  }
}

```

And part of the schema is:

```auto
type Subject {
    id: ID!
    name: String!
    topics: [Topic]! @hasInverse(field: subject)
}

type Topic {
    id: ID!
    name: String!
    subTopics: [SubTopic]! @hasInverse(field: topic)
    subject: Subject!
}

```

Thank you very much

---

<div class="post-metadata">

**Author:** ![amaster507](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amaster507/32/4123_2.png) [@amaster507](https://discuss.dgraph.io/u/amaster507)\
**Post date:** [December 10, 2020, 11:35pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/11 "2020-12-10T23:35:55Z")

</div>

@eianc,

It looks like you have a syntax error in your GraphQL. Instead of:

```auto
filter: {id: "0x4"}

```

use

```auto
filter: {id: ["0x4"]}

```

The Docs on [Slash API Explorer](https://slash.dgraph.io/_/explorer) can help with the expected syntax:

![image](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/6/635797202aff5d3925fab98ec40a3f1a68ebe8d8.png)

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [December 11, 2020, 6:11am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/12 "2020-12-11T06:11:00Z")

</div>

Thanks @eianc

Confirmed that this is a bug, the server shouldn’t panic. @JatinDevDG is looking into this.

---

<div class="post-metadata">

**Author:** ![eianc](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/eianc/32/5675_2.png) [@eianc](https://discuss.dgraph.io/u/eianc)\
**Post date:** [December 11, 2020, 11:13am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/13 "2020-12-11T11:13:53Z")

</div>

Hey @amaster507 @pawan,

Thank you for replying so quickly 🙂  
You are right, if I pass the id as an array the mutation works, however there is still a bug in the Api Explorer or somewhere.

Please see

 ![Screenshot from 2020-12-11 11-08-52](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/6/67651f12d5b534dd2bff3cbdb69cc17e18e28575.png)  
this works - but the id is not showing anymore in the API Explorer, as it does when is not wrapped in an array

---

<div class="post-metadata">

**Author:** ![amaster507](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/amaster507/32/4123_2.png) [@amaster507](https://discuss.dgraph.io/u/amaster507)\
**Post date:** [December 11, 2020, 2:36pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/14 "2020-12-11T14:36:42Z")

</div>

Yes there is a bug in that panel.

---

<div class="post-metadata">

**Author:** ![JatinDevDG](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jatindevdg/32/3417_2.png) [@JatinDevDG](https://discuss.dgraph.io/u/JatinDevDG)\
**Post date:** [December 16, 2020, 3:10pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/15 "2020-12-16T15:10:57Z")

</div>

Hi @eianc, we have fixed this bug. Now you can pass a single object and that will be coerced to the list if the required type is of list.  
PR:[fix(GraphQL): This PR addd input coercion from single object to list and fix panic when we pass single ID in filter as a string. by JatinDevDG · Pull Request #7133 · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/pull/7133)

---

<div class="post-metadata">

**Author:** ![eianc](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/eianc/32/5675_2.png) [@eianc](https://discuss.dgraph.io/u/eianc)\
**Post date:** [December 17, 2020, 4:43pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/16 "2020-12-17T16:43:54Z")

</div>

Thank you @JatinDevDG  
I saw that your code has been merged, but I’m still getting the error on my mutations in the API Explorer 🙂  
I’m using Slash GraphQL, I did a hard refresh and cleared the cache in the browser.  
Is there something else I should do to see your changes?

---

<div class="post-metadata">

**Author:** ![JatinDevDG](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jatindevdg/32/3417_2.png) [@JatinDevDG](https://discuss.dgraph.io/u/JatinDevDG)\
**Post date:** [December 18, 2020, 6:02am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/17 "2020-12-18T06:02:00Z")

</div>

@eianc, ohhh, These changes are merged in master branch. And Slash is using 20.11 release. We will include these changes in 20.11 in next patch release then update slash to that.

---

<div class="post-metadata">

**Author:** ![eianc](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/eianc/32/5675_2.png) [@eianc](https://discuss.dgraph.io/u/eianc)\
**Post date:** [December 18, 2020, 11:18am UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/18 "2020-12-18T11:18:10Z")

</div>

Great - thanks a lot @JatinDevDG

---

<div class="post-metadata">

**Author:** ![billybobthorton](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@billybobthorton](https://discuss.dgraph.io/u/billybobthorton)\
**Post date:** [December 23, 2020, 6:35pm UTC](https://discuss.dgraph.io/t/where-to-get-error-stacktrace/10768/19 "2020-12-23T18:35:58Z")

</div>

Ran into same problem, the fix hasn’t been rolled out yet right?  
Looks like I am on: v20.11.0-rc2
