Skip to content

INT-544 handle bad response issue when adding query to a job#4

Open
pgupta-jw wants to merge 2 commits into
masterfrom
pgupta.INT-544.handle-empty-response-issue
Open

INT-544 handle bad response issue when adding query to a job#4
pgupta-jw wants to merge 2 commits into
masterfrom
pgupta.INT-544.handle-empty-response-issue

Conversation

@pgupta-jw

@pgupta-jw pgupta-jw commented Apr 2, 2020

Copy link
Copy Markdown

When a SF query is added to the job, at times SF returns an XML response without batch ID or job ID. It seems to happen when ApiBatchLimit has been hit. And the salesforce_bulk gem we use does not handle this scenario gracefully.
It leads to annoying rollbar noise which lasts for quite a while until rate limit clears and things are back to normal.
https://rollbar.com/justworks/clockwork_web/items/7252
https://rollbar.com/justworks/clockwork_web/items/7251

This PR has changes to handle such scenarios, and raise a custom exception. It will help calling client (i.e. clockwork salesforce.rake task) to handle it gracefully. (PR for that to follow once we merge this and upgrade clockwork to this version of the gem)

Below ticket has more details on the debugging done.
Reference:
https://justworks.atlassian.net/browse/GROWTH-19

SF API Batch documentation:
https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_batches_create.htm

@pgupta-jw pgupta-jw changed the title INT-544 handle empty response issue when adding query to a job INT-544 handle bad response issue when adding query to a job Apr 24, 2020
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