You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've been using alchemy rpc for a while and it works fine wothout appending an apikeys sometimes.
maybe a change from them or something but it suddenly didn't work anymore with 404 error..
making contract calls now fails with
2415 |* @param response string[] - response from the method
2416 |* @return Result - parsed response corresponding to the abi
2417 |*/
2418 | parse(method, response) {
2419 | const { outputs } = this.abi.find((abi) => abi.name === method);2420 | const responseIterator = response.flat()[Symbol.iterator](); ^TypeError: undefined is not an object (evaluating 'response.flat') at parse (/home/ikem/dev/horuslab/karst-backend/node_modules/starknet/dist/index.mjs:2420:30)
Throwing a better error when the apicall fails make it easier to debug and find the actual cause of a misbehaior
A little digging and await rawResult.json(); here returns error as undefind when this error happens
asyncfetchEndpoint(method,params){try{constrawResult=awaitthis.fetch(method,params,this.requestId+=1);const{ error, result }=awaitrawResult.json();console.log({error, result})this.errorHandler(method,params,error);returnresult;}catch(error){this.errorHandler(method,params,error?.response?.data,error);throwerror;}}
{ error: undefined, result: undefined, }
Describe the solution you'd like
Throw a detail rpc error when the api call fails
Is your feature request related to a problem? Please describe.
I've been using alchemy rpc for a while and it works fine wothout appending an apikeys sometimes.
maybe a change from them or something but it suddenly didn't work anymore with 404 error..
making contract calls now fails with
Throwing a better error when the apicall fails make it easier to debug and find the actual cause of a misbehaior
A little digging and
await rawResult.json();
here returns error as undefind when this error happens{ error: undefined, result: undefined, }
Describe the solution you'd like
Throw a detail rpc error when the api call fails
The text was updated successfully, but these errors were encountered: