Skip to content

Updating customer password gives random 400 errors #91

Open

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.

Activity

  1. akshatbjain commented on May 6, 2020

    @akshatbjain
    Author

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

  2. akshatbjain commented on May 13, 2020

    @akshatbjain
    Author

    ???

  3. akshatbjain commented on Jun 16, 2020

    @akshatbjain
    Author

    Anyone?

  4. iamaclone commented on Jun 16, 2020

    @iamaclone

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

  5. micah1701 commented on Jul 7, 2024

    @micah1701

    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

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