Skip to content

Commit 2b84ce3

Browse files
committed
updates
1 parent 2104490 commit 2b84ce3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

components/quickbooks/actions/search-vendors/search-vendors.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default {
3737
},
3838
async run({ $ }) {
3939
if (!this.whereClause) {
40-
throw new ConfigurationError("Must provide includeClause, whereClause parameters.");
40+
throw new ConfigurationError("Must provide whereClause parameter.");
4141
}
4242

4343
const orderClause = this.orderClause

components/quickbooks/common/utils.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,14 @@ export async function retryWithExponentialBackoff(
5555
} catch (error) {
5656
const status = error.response?.status;
5757
const errorCode = error.response?.data?.Fault?.Error?.[0]?.code;
58+
const errorCodeStr = errorCode == null
59+
? undefined
60+
: String(errorCode);
5861

5962
const isRateLimit = status === 429 ||
6063
status === 503 ||
61-
errorCode === "3200" || // Rate limit exceeded
62-
errorCode === "10001"; // Throttle limit exceeded
64+
errorCodeStr === "3200" || // Rate limit exceeded
65+
errorCodeStr === "10001"; // Throttle limit exceeded
6366

6467
if (retries > 0 && isRateLimit) {
6568
const retryAfter = error.response?.headers?.["retry-after"];

0 commit comments

Comments
 (0)