Skip to content

Commit 2caadf9

Browse files
Wilson, JamesWilson, James
Wilson, James
authored and
Wilson, James
committed
Even better graphql error handling
1 parent fc3df0e commit 2caadf9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "saloon",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "An E2E Test Seeder for Enterprise Web Applications",
55
"main": "dist/saloon.js",
66
"module": "dist/module/main.js",

src/requestAdapters/Graphql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GraphqlAdapter extends BaseRequestAdapter {
2323
},
2424
})
2525
.then(({ data }) => {
26-
if (!data.data && data.errors.length > 0) {
26+
if (data.errors.length > 0) {
2727
throw new Error(JSON.stringify(data.errors));
2828
}
2929
return data;

0 commit comments

Comments
 (0)