0

I am working on a scenario where I export a set of records to Salesforce via bulk API 2.0, I need to handle the daily Salesforce limit exceeded scenarios gracefully.Mainly the REST and Bulk V2 API limits.

  • Is there a document on what kind of errors and error codes Salesforce returns when limits are reached? (sounds like a googlable point, but could not find any official resource)
  • After implementing the logic to handle the above limits, is there any way I can test this functionality apart from intentionally exceeding the limits on the org? - The org is shared and I cannot afford to consume all the APIs myself.
1
  • You could create your own scratch org to test? – Prashanth K Dec 5 '20 at 14:14
0

Once you exceed a specific rolling limit, you'll receive a HTTP 403 response code with the errorCode "REQUEST_LIMIT_EXCEEDED" in the return payload. There is no built-in mechanism to test this functionality other than configuring your API consumer so it handles 403 return codes with that message appropriately.

One resource you can take advantage of is the Limits API, which will provide a payload describing your current organization's limit consumption status.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.