Skip to content

Commit

Permalink
fix: revert salesforce fix for undefined access_token (#1780)
Browse files Browse the repository at this point in the history
Co-authored-by: Sai Sankeerth <sanpj2292@github.com>
  • Loading branch information
sanpj2292 and Sai Sankeerth committed Jan 12, 2023
1 parent 9f108c0 commit d917b2e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/v0/destinations/salesforce/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ const salesforceResponseHandler = (destResponse, sourceMessage, authKey) => {
const { status, response } = destResponse;

// if the response from destination is not a success case build an explicit error
if (
// This condition will pop-up when `invalid_grant` error is thrown from Salesforce
!Number.isInteger(status) ||
(!isHttpStatusSuccess(status) && status >= 400)
) {
if (!isHttpStatusSuccess(status) && status >= 400) {
const matchErrorCode = errorCode =>
response &&
Array.isArray(response) &&
Expand Down

0 comments on commit d917b2e

Please sign in to comment.