# Apollo error sending two error object for each error

**URL:** <https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261>\
**Category:** Other Apollo Topics\
**Tags:** odyssey\
**Created:** [May 16, 2023, 7:06am UTC](https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261 "2023-05-16T07:06:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankit9787](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/ankit9787/32/4124_2.png) [@ankit9787](https://community.apollographql.com/u/ankit9787)\
**Post date:** [May 16, 2023, 7:06am UTC](https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261/1 "2023-05-16T07:06:14Z")

</div>

Hi @Michelle_Mabuyo I just cloned project voyage odyssey 1 series, code from below mentioned git url -

> **[GitHub - apollographql/odyssey-voyage-I](https://github.com/apollographql/odyssey-voyage-I)**
>
> Contribute to apollographql/odyssey-voyage-I development by creating an account on GitHub.

Please refere below snapshot - I am using locations subgraph and passing below query and null as localtionId

query Locations($locationId: ID!) {  
location(id: $locationId) {  
id  
name  
}  
}

 ![image](https://us1.discourse-cdn.com/flex019/uploads/apollographql/original/2X/a/a955bb789f0f698393e475feabdd95e91eaf8e6a.png)

But, there is a issue with error section in repsosne -  
I am getting two error object for similar type of error , refer below blockquote for complete error object-  
**For each type of error, error object contains duplicate object for same**

> Blockquote  
> {  
> “data”: {},  
> “errors”: [  
> {  
> “message”: “Variable "$locationId" of non-null type "ID!" must not be null.”,  
> “locations”: [  
> {  
> “line”: 1,  
> “column”: 17  
> }  
> ],  
> “extensions”: {  
> “code”: “BAD\_USER\_INPUT”,  
> “stacktrace”: [  
> “GraphQLError: Variable "$locationId" of non-null type "ID!" must not be null.”,  
> " at coerceVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\values.js:122:9)“,  
> " at getVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\values.js:45:21)”,  
> " at buildExecutionContext (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\execute.js:280:63)“,  
> " at execute (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\execute.js:116:22)”,  
> " at executeIncrementally (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\incrementalDeliveryPolyfill.js:47:34)“,  
> " at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)”,  
> " at async execute (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\requestPipeline.js:223:37)“,  
> " at async processGraphQLRequest (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\requestPipeline.js:158:32)”,  
> " at async internalExecuteOperation (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\ApolloServer.js:603:16)“,  
> " at async runHttpQuery (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\runHttpQuery.js:121:29)”  
> ]  
> }  
> },  
> {  
> “message”: “Variable "$locationId" of non-null type "ID!" must not be null.”,  
> “locations”: [  
> {  
> “line”: 1,  
> “column”: 17  
> }  
> ],  
> “extensions”: {  
> “code”: “BAD\_USER\_INPUT”,  
> “stacktrace”: [  
> “GraphQLError: Variable "$locationId" of non-null type "ID!" must not be null.”,  
> " at coerceVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\values.js:122:9)“,  
> " at getVariableValues (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\values.js:45:21)”,  
> " at buildExecutionContext (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\execute.js:280:63)“,  
> " at execute (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\graphql\execution\execute.js:116:22)”,  
> " at executeIncrementally (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\incrementalDeliveryPolyfill.js:47:34)“,  
> " at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)”,  
> " at async execute (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\requestPipeline.js:223:37)“,  
> " at async processGraphQLRequest (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\requestPipeline.js:158:32)”,  
> " at async internalExecuteOperation (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\ApolloServer.js:603:16)“,  
> " at async runHttpQuery (C:\Users\ankitsingh57\Documents\Humana\apollo\_voyage\_poroject\odyssey-voyage-I\subgraph-locations\node\_modules\@apollo\server\dist\cjs\runHttpQuery.js:121:29)”  
> ]  
> }  
> }  
> ]  
> }

---

<div class="post-metadata">

**Author:** ![ankit9787](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/ankit9787/32/4124_2.png) [@ankit9787](https://community.apollographql.com/u/ankit9787)\
**Post date:** [May 17, 2023, 5:58am UTC](https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261/2 "2023-05-17T05:58:49Z")

</div>

@Michelle_Mabuyo Gentle reminder regarding the same, I am getting duplicate errors i.e. two error object per error, so program has 2 errors, getting 4 objects in errors. Please see  
Getting in subgraph locations project

---

<div class="post-metadata">

**Author:** ![Michelle\_Mabuyo](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/michelle_mabuyo/32/80_2.png) [@Michelle\_Mabuyo](https://community.apollographql.com/u/Michelle_Mabuyo)\
**Post date:** [May 17, 2023, 3:25pm UTC](https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261/3 "2023-05-17T15:25:46Z")

</div>

Hey @ankit9787 ! I’m getting the same duplicate error and I’m looking into it. Thanks for letting us know!

---

<div class="post-metadata">

**Author:** ![Michelle\_Mabuyo](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/michelle_mabuyo/32/80_2.png) [@Michelle\_Mabuyo](https://community.apollographql.com/u/Michelle_Mabuyo)\
**Post date:** [May 17, 2023, 5:15pm UTC](https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261/4 "2023-05-17T17:15:01Z")

</div>

Reporting back @ankit9787 ! The team has fixed the issue, so you should no longer be seeing duplicate error messages 🎉

You’ll need to update Sandbox first. Click on the megaphone icon beside your profile photo on the top right.

![Screenshot 2023-05-17 at 1.10.59 PM](https://us1.discourse-cdn.com/flex019/uploads/apollographql/original/2X/7/7a7fa8b8c8cd5b48857f61428d6b4698e1837176.png)

Then click the button “Update available, click to relaunch”.

 ![Screenshot 2023-05-17 at 1.10.08 PM](https://us1.discourse-cdn.com/flex019/uploads/apollographql/original/2X/9/9b7ca4f677c187d4c77b83b424e3f870c0085286.jpeg)

Hope that works on your end, let me know if I can help any further! Thanks again for reporting this!

---

<div class="post-metadata">

**Author:** ![Justin\_Gonzalez](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/justin_gonzalez/32/5359_2.png) [@Justin\_Gonzalez](https://community.apollographql.com/u/Justin_Gonzalez)\
**Post date:** [February 6, 2025, 8:48pm UTC](https://community.apollographql.com/t/apollo-error-sending-two-error-object-for-each-error/6261/5 "2025-02-06T20:48:49Z")

</div>

Archived on February 6, 2025, 8:48pm UTC


