Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating customer password gives random 400 errors #91

Open
akshatbjain opened this issue Apr 22, 2020 · 5 comments
Open

Updating customer password gives random 400 errors #91

akshatbjain opened this issue Apr 22, 2020 · 5 comments

Comments

@akshatbjain
Copy link

akshatbjain commented Apr 22, 2020

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.

@akshatbjain
Copy link
Author

Can someone please help? This is causing an issue for us that needs to be fixed soon.

@akshatbjain
Copy link
Author

???

@akshatbjain
Copy link
Author

Anyone?

@iamaclone
Copy link

I faced and am facing the same issue too. Any response on this?

@micah1701
Copy link

I see this thread is 4 years old but just wanted to comment for anyone else who ends up here:

If the submitted password does not match the "minimum password requirements" arbitrarily assigned by BigCommerce you will get the 400 error with no explanation as to why. For my current site, the requirements are, at a minimum, a length of 7 characters and there must be a combination of letters AND numbers.

Also, it will reject things like "password1" even though it meets the above criteria.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants