Skip to content

Updating customer password gives random 400 errors #91

Open
@akshatbjain

Description

@akshatbjain

Overview

I am trying to update the customer password in one of my applications. Sample code:

import bigcommerce

big_commerce_url_info = xxx
big_commerce_store_hash = xxx
big_commerce_client_id = xxx
big_commerce_auth_token = xxx
customer_id = xxx
password = xxx

try:
    api = bigcommerce.api.BigcommerceApi(client_id=big_commerce_client_id, store_hash=big_commerce_store_hash, access_token=big_commerce_auth_token)
    api.Customers.get(customer_id).update(_authentication=dict(password=password))
except Exception as e:
    print("ERROR: ", str(e))

Expected behavior

It should update the password every single time.

Actual behavior

It updates the password most of the times for most customers but some times it randomly gives the following error:

ERROR: 400 Bad Request @ customers/1705: b'[{"status":400,"message":"The field \'password\' is invalid."}]'

Steps to reproduce the behavior

Just run the code multiple times and it will randomly fail at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions