Skip to content

Commit

Permalink
Even better graphql error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilson, James authored and Wilson, James committed Dec 18, 2018
1 parent fc3df0e commit 2caadf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "saloon",
"version": "1.4.1",
"version": "1.4.2",
"description": "An E2E Test Seeder for Enterprise Web Applications",
"main": "dist/saloon.js",
"module": "dist/module/main.js",
Expand Down
2 changes: 1 addition & 1 deletion src/requestAdapters/Graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GraphqlAdapter extends BaseRequestAdapter {
},
})
.then(({ data }) => {
if (!data.data && data.errors.length > 0) {
if (data.errors.length > 0) {
throw new Error(JSON.stringify(data.errors));
}
return data;
Expand Down

0 comments on commit 2caadf9

Please sign in to comment.