Skip to content

Reduce Salesforce report calls and expose quota errors - #164

Merged
jmgasper merged 1 commit into
developfrom
sf-rate-limit
Sep 22, 2026
Merged

jmgasper merged 1 commit into
developfrom
sf-rate-limit

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

Problem

Salesforce is rejecting synchronous report executions with HTTP 403 once the 500 reports per 60 minutes limit is reached. The API previously logged only the status and allowed a manual refresh every five seconds, so the reason was hidden while repeated requests continued.

Change

  • Log bounded Salesforce error codes, messages, report ID, and request ID when available; redact known credentials and keep full response bodies out of logs.
  • Pause report calls for five minutes when Salesforce reports this quota error.
  • Limit manual refreshes and failed refresh retries to one per minute per service instance.
  • Update the Sales API documentation and tests.

Validation

  • pnpm lint and pnpm build passed.
  • Sales-focused tests passed: 42 tests.
  • Full pnpm test --runInBand remains red in unrelated, untouched SFDC report tests (20 failures across two suites).

@jmgasper
jmgasper merged commit 8000a02 into develop Sep 22, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

1 participant