Bungie-net / api

Resources for the Bungie.net API
Other
1.22k stars 92 forks source link

UnhandledException error when trying to equip weapons #1753

Closed tyty-04 closed 1 year ago

tyty-04 commented 1 year ago

I'm trying to create a simple post request to equip a weapon just to test something for an app I'm trying to make. I'm currently stuck getting an UnhandledException error and I'm not sure where to go from here. Here is my code: const response = await fetch( https://www.bungie.net/Platform/Destiny2/Actions/Items/EquipItems/, { method: "POST", headers: { Authorization:Bearer ${sessionStorage.getItem("accessToken")}, "X-API-Key":${this.state.API_KEY}, "Content-Type": "application/json", }, body: JSON.stringify({ itemId: "6917529582624172129", characterId:${this.state.characters[0]}, membershipType:${this.state.membershipType}, }), } );

And here is the response: {"ErrorCode":3,"ThrottleSeconds":0,"ErrorStatus":"UnhandledException","Message":"We’ve encountered an error, please try again later.","MessageData":{}}

Any help would be appreciated, let me know if you need any more info from me.

jshaffstall-bng commented 1 year ago

That API is for equipping multiple items. Try the API for only equipping one item at a time.