File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export default {
7777 } ,
7878 } ,
7979 } ) ;
80- $ . export ( "$summary" , `Customer successfully created with id ${ response . data . createCustomer . customer . id } ` ) ;
80+ $ . export ( "$summary" , `Customer successfully created with ID ${ response . data . createCustomer . customer . id } ` ) ;
8181 return response ;
8282 } ,
8383} ;
Original file line number Diff line number Diff line change 1- import { axios } from "@pipedream/platform" ;
1+ import {
2+ axios , ConfigurationError ,
3+ } from "@pipedream/platform" ;
24
35export default {
46 type : "app" ,
57 app : "braintree" ,
68 propDefinitions : { } ,
79 methods : {
8- makeGraphQLRequest ( {
10+ async makeGraphQLRequest ( {
911 $ = this , ...opts
1012 } ) {
11- return axios ( $ , {
13+ const response = await axios ( $ , {
1214 method : "post" ,
1315 url : `https://${ this . $auth . environment } .braintree-api.com/graphql` ,
1416 headers : {
@@ -21,6 +23,10 @@ export default {
2123 } ,
2224 ...opts ,
2325 } ) ;
26+ if ( response . errors ) {
27+ throw new ConfigurationError ( response . errors [ 0 ] . message ) ;
28+ }
29+ return response ;
2430 } ,
2531 } ,
2632} ;
You can’t perform that action at this time.
0 commit comments