Happy Business Starts Here

intermittent errors "Failed to get user info", "Authentication error"

Highlighted
Master

intermittent errors "Failed to get user info", "Authentication error"

A script that has been working for months, and has not been changed, today failed (intermittently) with the following error messages:

 

  • Authentication error
  • Failed to get user info

 

Below is the output. This was in apisandbox.

 

One of the errors seems to be undocumented ("Failed to get user info"). I don't understand how either of them should be intermittent.

 

Insights?

 

 

Bo-MBP: migrate % ./reset.sh 
deleting accounts...
Traceback (most recent call last):####                                         |
  File "./deleteaccounts.py", line 163, in <module>
    main()
  File "./deleteaccounts.py", line 158, in main
    deleteMigratedAccounts(zuora)
  File "./deleteaccounts.py", line 93, in deleteMigratedAccounts
    deleteAccounts(zuora, firstBatch)
  File "./deleteaccounts.py", line 108, in deleteAccounts
    results = zuora.delete('Account', chunk)
  File "../rest/zuora.py", line 96, in delete
    theseResults = self._post('/action/delete', {'type': objectType, 'ids': chunk})
  File "../rest/zuora.py", line 35, in _post
    return self._unpackResponse('POST', path, response)
  File "../rest/zuora.py", line 45, in _unpackResponse
    assert response.status_code == 200, '{} to {} failed: {}'.format(operation, path, response.content)
AssertionError: POST to /action/delete failed: b'{"message":"Failed to get user info"}\n'
Bo-MBP: migrate % ./reset.sh 
deleting accounts...
Traceback (most recent call last):#######                                      |
  File "./deleteaccounts.py", line 163, in <module>
    main()
  File "./deleteaccounts.py", line 158, in main
    deleteMigratedAccounts(zuora)
  File "./deleteaccounts.py", line 93, in deleteMigratedAccounts
    deleteAccounts(zuora, firstBatch)
  File "./deleteaccounts.py", line 108, in deleteAccounts
    results = zuora.delete('Account', chunk)
  File "../rest/zuora.py", line 96, in delete
    theseResults = self._post('/action/delete', {'type': objectType, 'ids': chunk})
  File "../rest/zuora.py", line 35, in _post
    return self._unpackResponse('POST', path, response)
  File "../rest/zuora.py", line 45, in _unpackResponse
    assert response.status_code == 200, '{} to {} failed: {}'.format(operation, path, response.content)
AssertionError: POST to /action/delete failed: b'{"message":"Failed to get user info"}\n'
Bo-MBP: migrate % ./reset.sh 
deleting accounts...
Traceback (most recent call last):#########################                    |
  File "./deleteaccounts.py", line 163, in <module>
    main()
  File "./deleteaccounts.py", line 158, in main
    deleteMigratedAccounts(zuora)
  File "./deleteaccounts.py", line 93, in deleteMigratedAccounts
    deleteAccounts(zuora, firstBatch)
  File "./deleteaccounts.py", line 108, in deleteAccounts
    results = zuora.delete('Account', chunk)
  File "../rest/zuora.py", line 96, in delete
    theseResults = self._post('/action/delete', {'type': objectType, 'ids': chunk})
  File "../rest/zuora.py", line 35, in _post
    return self._unpackResponse('POST', path, response)
  File "../rest/zuora.py", line 45, in _unpackResponse
    assert response.status_code == 200, '{} to {} failed: {}'.format(operation, path, response.content)
AssertionError: POST to /action/delete failed: b'{"message":"Authentication error"}\n'
Bo-MBP: migrate % ./reset.sh 
deleting accounts...
100% |#########################################################################|
Traceback (most recent call last):
  File "./deleteaccounts.py", line 163, in <module>
    main()
  File "./deleteaccounts.py", line 158, in main
    deleteMigratedAccounts(zuora)
  File "./deleteaccounts.py", line 95, in deleteMigratedAccounts
    secondBatch = getAllAccountIds(zuora)
  File "./deleteaccounts.py", line 74, in getAllAccountIds
    result = zuora.query(ACCOUNTS_QUERY)
  File "../rest/zuora.py", line 52, in query
    response = self._post("/action/query", {"queryString" : queryString})
  File "../rest/zuora.py", line 35, in _post
    return self._unpackResponse('POST', path, response)
  File "../rest/zuora.py", line 45, in _unpackResponse
    assert response.status_code == 200, '{} to {} failed: {}'.format(operation, path, response.content)
AssertionError: POST to /action/query failed: b'{"message":"Authentication error
Bo-MBP: migrate % ./reset.sh 
deleting accounts...
100% |#########################################################################|
deleted 3 accounts
classifying opps...