question

Matt Rochon avatar image
Matt Rochon asked

ExecuteInventoryOperations: Wrong error code returned

If i use ExecuteInventoryOperations with a Subtract operation for an item that doesnt exist in a player's inventory, it returns

{"HttpCode":400,"HttpStatus":"BadRequest","Error":1071,"ErrorMessage":"Unknown Error","ErrorDetails":null,"RequestId":"---","RetryAfterSeconds":null}

I would expect it to return

1059 - Insufficient funds or 1047 - ItemNotFound

This makes it hard to gracefully handle this case.

apisIn-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

Thanks for the bug report. We'll take a look and see if we can reproduce it.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kylemc@microsoft.com avatar image kylemc@microsoft.com commented ·

We reproduced the issue and are working on a fix now. It should be available soon.

0 Likes 0 ·
Xiao Zha avatar image
Xiao Zha answered

For the ExecuteInventoryOperations API, an "Items not found" error will be reported when the item does not exist in the Catalog. Currently, if the item is not in the player's inventory, but is in the catalog, an "unknown error" will be reported.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.