-
Notifications
You must be signed in to change notification settings - Fork 10
Error filtering the status in getOrderHistory #170
Comments
I don't understand, what do you mean by "getOrderHistory errors"? |
@chancity ^^ |
Hey hey, so what happened was I created a pay_to_user offer and before submitting the offer id my program threw and exception causing it to crash. I wasn't storing OrderIds at that time so the order was never submitted. I thought hmm here's an endpoint to view offers and orders, maybe I can find my unsubmitted order id on one of those endpoints. Nope wasn't in offers and orders is failing because and order had a status of "opened". |
Sorry I don't have the JSON error from the request but I have a pretty good idea what method in the marketplace server is throwing the exception. Here: |
@chancity What I still don't understand is how you received an error. To which endpoint did you call when you got it? |
SO on step 5 my program crashed, not related to the Market place API at all. Upon restart I called step 6 and this is were the market place API threw an exception. When I get on my computer today I'll try to find the market place user id the exception is occurring on.
|
@chancity |
Give me around 10-30 minutes and I'll have it all posted. |
|
Use Fiddler4 to view the http traffic in the error dump. Here's the user information: Here's the json response: |
Also I intentionally did this for the error to occur, if I uncomment it everything is fine.
|
@chancity |
@chancity I had a look and I can't reproduce the error. It also never happened on both our production and playground environments. |
Occurs using the devplatform branch https://api.developers.kinecosystem.com/v1 |
Mind sending me a snippet of the code you used to test it? |
|
Here's the code that is failing, I'm doing it intentionally but if any application were to crash after posting data to /offers/external/orders and not POST /orders/{externalOrderId} doing a GET /orders will always result in {"code":5002,"error":"Internal Server Error","message":"Opened orders should not be returned"} indefinately. |
@Ronserruya @yosriz It's an issue on your branch, can you take it from here? |
Closing this as we weren't able to reproduce it with this repo, maybe it is specific to the developer's fork. |
@chancity please refer to kinecosystem/kin-devplatform-marketplace-server#10 |
If an external offer is created but never submitted getOrderHistory errors because it's populating the array with orders that are open...kin-devplatform-marketplace-server uses the same method of getting orders aswell.
https://github.com/kinecosystem/marketplace-server/blob/master/scripts/src/public/services/orders.ts#L337-L340
https://github.com/kinecosystem/kin-devplatform-marketplace-server/blob/master/scripts/src/public/services/orders.ts#L315-L318
The text was updated successfully, but these errors were encountered: