Another Amazon API brownout?

Bear with me...

BrowseNode # 1267877011 comes back with an empty 'Name' (at least it does right now).

http://www.browsenodes.com/detail-1267877011.html shows the name as "Warehouse Deals". But when I do an item detail page lookup with the Browse Info panel visible, the browse ancestor hierarchy shows this:

http://example.com/amazon_store/item/B0000AY4YT

Meguiar's M4965 Marine/RV Fiberglass Restoration System
Sports & Outdoors : Categories : Boating & Water Sports : Boating : Maintenance Supplies : Cleaners :
Automotive : Categories : Car Care : Cleaning Kits :
Automotive : Categories : Car Care : Exterior Care : Cleaners :
: Products : All product :
: Special Features : Just arrived :

(Note that I've fixed the widget on my dev box so that it shows the ancestors first (current builds will show them reversed per #1167828: Amazon Browse widget navigation order is reversed)

So the last two items have a blank "Name" field for the first browse node, which happens to be "Warehouse Deals". Notice the two that start with ":". Those are both browsenode 1267877011, which should be "Warehouse Deals"

    [BrowseNodes] => SimpleXMLElement Object
        (
            [BrowseNode] => Array
                (
                    [0] => SimpleXMLElement Object
                        (
                            [BrowseNodeId] => 3398881
                            [Name] => Cleaners
                            [Ancestors] => SimpleXMLElement Object
                                (
                                    [BrowseNode] => SimpleXMLElement Object
                                        (
                                            [BrowseNodeId] => 2347479011
                                            [Name] => Maintenance Supplies
                                            [Ancestors] => SimpleXMLElement Object
                                                (
                                                    [BrowseNode] => SimpleXMLElement Object
                                                        (
                                                            [BrowseNodeId] => 3397331
                                                            [Name] => Boating
                                                            [Ancestors] => SimpleXMLElement Object
                                                                (
                                                                    [BrowseNode] => SimpleXMLElement Object
                                                                        (
                                                                            [BrowseNodeId] => 3421331
                                                                            [Name] => Boating & Water Sports
                                                                            [Ancestors] => SimpleXMLElement Object
                                                                                (
                                                                                    [BrowseNode] => SimpleXMLElement Object
                                                                                        (
                                                                                            [BrowseNodeId] => 3375301
                                                                                            [Name] => Categories
                                                                                            [IsCategoryRoot] => 1
                                                                                            [Ancestors] => SimpleXMLElement Object
                                                                                                (
                                                                                                    [BrowseNode] => SimpleXMLElement Object
                                                                                                        (
                                                                                                            [BrowseNodeId] => 3375251
                                                                                                            [Name] => Sports & Outdoors
                                                                                                        )

                                                                                                )

                                                                                        )

                                                                                )

                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                    [1] => SimpleXMLElement Object
                        (
                            [BrowseNodeId] => 15718281
                            [Name] => Cleaning Kits
                            [Ancestors] => SimpleXMLElement Object
                                (
                                    [BrowseNode] => SimpleXMLElement Object
                                        (
                                            [BrowseNodeId] => 15718271
                                            [Name] => Car Care
                                            [Ancestors] => SimpleXMLElement Object
                                                (
                                                    [BrowseNode] => SimpleXMLElement Object
                                                        (
                                                            [BrowseNodeId] => 15690151
                                                            [Name] => Categories
                                                            [IsCategoryRoot] => 1
                                                            [Ancestors] => SimpleXMLElement Object
                                                                (
                                                                    [BrowseNode] => SimpleXMLElement Object
                                                                        (
                                                                            [BrowseNodeId] => 15684181
                                                                            [Name] => Automotive
                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                    [2] => SimpleXMLElement Object
                        (
                            [BrowseNodeId] => 15718451
                            [Name] => Cleaners
                            [Ancestors] => SimpleXMLElement Object
                                (
                                    [BrowseNode] => SimpleXMLElement Object
                                        (
                                            [BrowseNodeId] => 15718291
                                            [Name] => Exterior Care
                                            [Ancestors] => SimpleXMLElement Object
                                                (
                                                    [BrowseNode] => SimpleXMLElement Object
                                                        (
                                                            [BrowseNodeId] => 15718271
                                                            [Name] => Car Care
                                                            [Ancestors] => SimpleXMLElement Object
                                                                (
                                                                    [BrowseNode] => SimpleXMLElement Object
                                                                        (
                                                                            [BrowseNodeId] => 15690151
                                                                            [Name] => Categories
                                                                            [IsCategoryRoot] => 1
                                                                            [Ancestors] => SimpleXMLElement Object
                                                                                (
                                                                                    [BrowseNode] => SimpleXMLElement Object
                                                                                        (
                                                                                            [BrowseNodeId] => 15684181
                                                                                            [Name] => Automotive
                                                                                        )

                                                                                )

                                                                        )

                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                    [3] => SimpleXMLElement Object
                        (
                            [BrowseNodeId] => 1288264011
                            [Name] => All product
                            [Ancestors] => SimpleXMLElement Object
                                (
                                    [BrowseNode] => SimpleXMLElement Object
                                        (
                                            [BrowseNodeId] => 1267878011
                                            [Name] => Products
                                            [IsCategoryRoot] => 1
                                            [Ancestors] => SimpleXMLElement Object
                                                (
                                                    [BrowseNode] => SimpleXMLElement Object
                                                        (
                                                            [BrowseNodeId] => 1267877011
                                                        )

                                                )

                                        )

                                )

                        )

                    [4] => SimpleXMLElement Object
                        (
                            [BrowseNodeId] => 1294321011
                            [Name] => Just arrived
                            [Children] => SimpleXMLElement Object
                                (
                                    [BrowseNode] => Array
                                        (
                                            [0] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297804011
                                                    [Name] => Televisions
                                                )

                                            [1] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297805011
                                                    [Name] => Electronics & Computers
                                                )

                                            [2] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297806011
                                                    [Name] => Video Games
                                                )

                                            [3] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 2054671011
                                                    [Name] => Software
                                                )

                                            [4] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297807011
                                                    [Name] => Kitchen
                                                )

                                            [5] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297808011
                                                    [Name] => Books
                                                )

                                            [6] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297809011
                                                    [Name] => Music
                                                )

                                            [7] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297810011
                                                    [Name] => Blu-ray & DVD
                                                )

                                            [8] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297811011
                                                    [Name] => Personal Care Appliances
                                                )

                                            [9] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297812011
                                                    [Name] => Home Improvement
                                                )

                                            [10] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 1297813011
                                                    [Name] => Sports
                                                )

                                            [11] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 2281133011
                                                    [Name] => Manager's Specials
                                                )

                                            [12] => SimpleXMLElement Object
                                                (
                                                    [BrowseNodeId] => 2281132011
                                                    [Name] => Shoes
                                                )

                                        )

                                )

                            [Ancestors] => SimpleXMLElement Object
                                (
                                    [BrowseNode] => SimpleXMLElement Object
                                        (
                                            [BrowseNodeId] => 1267879011
                                            [Name] => Special Features
                                            [Ancestors] => SimpleXMLElement Object
                                                (
                                                    [BrowseNode] => SimpleXMLElement Object
                                                        (
                                                            [BrowseNodeId] => 1267877011
                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

)

At this time, the lookup on at2developer.com (http://www.a2sdeveloper.com/decode-a2s-query.html?url=http%3A%2F%2Fecs.a...) seems to indicate that Amazon is not returning a Name for that Browse Node at this time:

<BrowseNodeLookupResponse>
 <OperationRequest>
  <HTTPHeaders>
   <Header Name="UserAgent" Value="Oblio/1.0 (+http://www.rogersmithsoftware.com/)" />
  </HTTPHeaders>
  <RequestId>0Z36T37A0A0XEEJN0GEQ</RequestId>
  <Arguments>
   <Argument Name="Service" Value="AWSECommerceService" />
   <Argument Name="ResponseGroup" Value="Request,BrowseNodeInfo,TopSellers,NewReleases,MostWishedFor,MostGifted" />
   <Argument Name="Operation" Value="BrowseNodeLookup" />
   <Argument Name="Version" Value="2009-03-01" />
   <Argument Name="Timestamp" Value="2011-05-29T02:34:47Z" />
   <Argument Name="AssociateTag" Value="browsenodes-20" />
   <Argument Name="Signature" Value="B3W9R1W/V/TCt+NP4383WD3AGlbLCoqXL/2q+JRXmCY=" />
   <Argument Name="BrowseNodeId" Value="1267877011" />
   <Argument Name="AWSAccessKeyId" Value="144RR0T0YM45X6SVKSR2" />
  </Arguments>
  <RequestProcessingTime>0.0941669940948486</RequestProcessingTime>
 </OperationRequest>
 <BrowseNodes>
  <Request>
   <IsValid>True</IsValid>
   <BrowseNodeLookupRequest>
    <BrowseNodeId>1267877011</BrowseNodeId>
    <ResponseGroup>TopSellers</ResponseGroup>
    <ResponseGroup>BrowseNodeInfo</ResponseGroup>
    <ResponseGroup>MostWishedFor</ResponseGroup>
    <ResponseGroup>Request</ResponseGroup>
    <ResponseGroup>NewReleases</ResponseGroup>
    <ResponseGroup>MostGifted</ResponseGroup>
   </BrowseNodeLookupRequest>
  </Request>
  <BrowseNode>
   <BrowseNodeId>1267877011</BrowseNodeId>
   <Children>
{SNIP}

Note the presence of a BrowseNodeId but no Name field.

So, my questions are:
1) is this a known issue with the Amazon API?
2) If this is known to occur from time to time, shouldn't the module deal with it more intelligently, like putting up a t('Not Available') string or something...?

Comments

mcurry’s picture

I guess what concerns me most is that the Amazon API responses return unreliable results. By unreliable, I mean we cannot rely on the API to return valid and/or useful data in all cases. So we have to do something reasonable when Amazon doesn't give us what we need, lest we confuse or confound the site's visitors...

mcurry’s picture

Title: Item's BrowseNodes Ancestor list items do not always have "Name" field in server response. » BrowseNode Names not always available from Amazon servers.

Changing title to reflect actual situation.

mcurry’s picture

Another oldie from Amazon developer forums...
https://forums.aws.amazon.com/thread.jspa?threadID=9658

rfay’s picture

Sadly, as you see, there are lots of things about Amazon's API that you just plain can't count on. Lots of failures you can count on too.

mcurry’s picture

Yes, and when combined with the API throttling, it makes me wonder if it makes sense to rely on Amazon's API these days :D

In any case, as I continue working with the Amazon Store module (and underlying Amazon APIs) I see there are a few areas where we should improve our handling of these problems. My main concern is to always present sensible information to the site visitor.

mcurry’s picture

Title: BrowseNode Names not always available from Amazon servers. » Browse Info Panel needs to handle missing Browse Node Name fields
Assigned: Unassigned » mcurry
Category: support » feature

Changing title and other metadata, since I now know that we'll need to fix some things...

rfay’s picture

Since you're into the ctools panels right now, please keep in mind that this stuff has not yet been made to work in D7, so you may want to visit D7 while you're in this territory.

mcurry’s picture

Status: Active » Closed (duplicate)

I'm going to close this issue, fixes will be tracked in #1172442: Browse Info panel (amazon_store_browsenodes_panel.tpl.php) fixes and improvements . Please go there for status and patches.

mcurry’s picture

#7
Posted by rfay on May 29, 2011 at 8:41am

Since you're into the ctools panels right now, please keep in mind that this stuff has not yet been made to work in D7, so you may want to visit D7 while you're in this territory.

Will do. I hope you understand that my first priority is getting my D6-based Amazon Store site online. Once that is done, I will have more time to devote to D7 patches. :D

Edit: Removed snarky-sounding text that wasn't intended to sound snarky...