Skip to content

Commit 328dd34

Browse files
authored
Merge pull request #1 from lex111/patch-1
[Client]: Send errors when success GraphQL request
2 parents 7b5f979 + e7d8fcb commit 328dd34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Client.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ function makeClient() {
8080

8181
if (response.status >= 200 && response.status < 300) {
8282
const result = await response.json();
83+
84+
if (result.errors) {
85+
return Promise.reject(result.errors);
86+
}
8387

8488
if (result.data) {
8589
return result.data;

0 commit comments

Comments
 (0)