minimul / qbo_api

Ruby JSON-only client for QuickBooks Online API v3. Built on top of the Faraday gem.
MIT License
85 stars 45 forks source link

Why would a query request intermittently produce an error with "error_code: 120" #96

Closed grapevinegizmos closed 4 years ago

grapevinegizmos commented 5 years ago

Wondering if you might now what this error message means.

It intermittently occurs when I running tests in RSpec which run the query ("Select * from Accounts") with the api. Same credentials are being used on multiple tests in the same suite, usually the tests work fine, but with some regularity I get the error below, and I can't figure out the cause, Once in a while I see the error in prod which is particularly concerning.

My first thought was that the test suite was hitting the api much and this was some kind of throttling problem. But there are specific error codes for throttling and this isn't one of them. The only reference I could find to an "error_code: 120" says something about

'AuthorizationFailure : XXX Accountant user was deleted while still connected to the company.'

But I'm not deleting any 'account user' at all. Not 100% sure what an accountant user actually is.

Any thoughts, how I can stop it?

 QboApi::InternalServerError:
       [{:fault_type=>"AuthorizatonFault", :error_code=>"120", :error_message=>"Authorization Failure", :error_detail=>"AuthorizationFailure: Unknown Error during Authentication, statusCode: 500"}]
minimul commented 5 years ago

I haven't personally seen that particular error.

Intuit had a bunch of outages recently – I wonder if there might not be a correlation.