Refund Resolve Mutation is returning Internal Error but when calling thru curl, it works

Solved

Refund Resolve Mutation is returning Internal Error but when calling thru curl, it works

WilliamATM
Shopify Partner
32 0 4

My app is calling refund resolve and getting

"Internal error. Looks like something went wrong on our end."

 

Below are some of the request ids.

0638c110-1afa-4074-a2b6-810db46c58e4
b591e2da-92d3-4592-b47d-e1ef0e484045

 

But when I am calling the curl manually, it works.

 

Is there a way to find what might be the issue?

Accepted Solution (1)

Luke_K
Shopify Staff
402 66 102

This is an accepted solution.

Hey @WilliamATM 

 

Thanks for those supplied request-id's! Looks like you've got the same case that led to my response to other partners here. 

 

It's because the resolve mutation is called too quickly, or if the partners app responds 201 and the resolve mutation is called at exactly the same time. If this happens, this results in the Order Transaction ID not being able to be found, which in turn leads to the failure.


Retrying will resolve the Order Transaction. There's some further details on our plans to make this easier for our partners too in my response above too.  Hope that helps!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post

Replies 3 (3)

WilliamATM
Shopify Partner
32 0 4

Edit:

Curl or APP does not matter.

I tried calling it multiple times, it always fails on the first one and successful on the second one.

I am not sure what is the reason is.

Luke_K
Shopify Staff
402 66 102

This is an accepted solution.

Hey @WilliamATM 

 

Thanks for those supplied request-id's! Looks like you've got the same case that led to my response to other partners here. 

 

It's because the resolve mutation is called too quickly, or if the partners app responds 201 and the resolve mutation is called at exactly the same time. If this happens, this results in the Order Transaction ID not being able to be found, which in turn leads to the failure.


Retrying will resolve the Order Transaction. There's some further details on our plans to make this easier for our partners too in my response above too.  Hope that helps!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
WilliamATM
Shopify Partner
32 0 4

Thanks for the response.

 

I did manage to implement the retry policy and I thought it is a dirty work around.

 

Now it all makes sense. Than you so much.