Open Lolocec4 opened 4 years ago
Sorry, this does not help at all. Rather, I would need the item that you were searching for in the first place, and from there find out why the trade site wasn't returning properly formatted data.
so, its sounds like api callback error and we cant fix it ? but we can miss it, or popup little error message to user ?
i check lots of items and than sell them to vendor, if i catch this one more time, i pm u with full log
and , maybe i'm wrong but root of error maybe locates here
var itemclass = item["rarity"];
if (item["category"] == "gem" || item["category"] == "prophecy" || item["category"] == "card" || item[
"category"] == "currency") {
itemclass = item["category"];
}
i think , i checkd some unknown itemtype for macro, and 99% this item been corrupted or unidentified
so, its sounds like api callback error and we cant fix it ? but we can miss it, or popup little error message to user ?
If it gets to the javascript at all, that means the trade site returned some resemblance of correct data that's been verified as valid by PTA. The only way the code gets this far and still errors is if this data has bad data nested pretty deep in the results, which seems to be what happened to you in this instance. It could either be a problem on GGG's end or it could be a case that I've never encountered while reverse engineering the API for PTA. Either way, I wouldn't be able to know for sure unless I have the item or the item code and replicate the exact API call to the trade site that returns this bad data that passes validation checks.
and , maybe i'm wrong but root of error maybe locates here
var itemclass = item["rarity"]; if (item["category"] == "gem" || item["category"] == "prophecy" || item["category"] == "card" || item[ "category"] == "currency") { itemclass = item["category"]; }
i think , i checkd some unknown itemtype for macro, and 99% this item been corrupted or unidentified
An unknown itemtype wouldn't stop the price
field from being null, which is what the javascript errored on. As far as I know, all results from the trade site with results should have that field, even if the player didn't set a price on their item, which makes this error even more curious.
{ "title": "Price", "field": function (entry) { var amount = entry["listing"]["price"]["amount"]; if (amount == null) { amount = ""; } var currency = entry["listing"]["price"]["currency"]; if (currency == null ) { currency = ""; } return amount.toString() + " " + currency; } },