EladA
EladA

Reputation: 377

Bottlenose 400 - How To Parse HTTPError

I'm getting a 400 error when testing the examples provided by Bottleneck.

I double checked that I'm using the correct Associate Tag with the right region (do I include the '-20' in the AWS_ASSOCIATE_TAG?), I tried setting my Ubuntu's timezone (running on a VM) to GMT to follow the api_url builder (below) but that didn't help.

I checked the credentials using AWS-Cli and I was able to pull all EC2 instances without a permission error.

I tried reading the HTTPError using e.read, but I'm getting a class bytes object which I can't further investigate.

Is there a way to parse the error into XML or a simple string so that I could understand what the error actually is? Did anyone else encounter this problem and can think of a solution?

AWS Error codes

    query = {
        'Operation': self.Operation,
        'Service': "AWSECommerceService",
        'Timestamp': time.strftime(
            "%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
        'Version': self.Version,
    }

Upvotes: 1

Views: 150

Answers (1)

EladA
EladA

Reputation: 377

I was skimming the docs and so I missed a crucial element - I was using AWS' API credentials, while the ones required belong to Amazon Product API.

To access those, please use this link.

Upvotes: 2

Related Questions