Skip to content

Commit

Permalink
fix: adding error message dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Nov 11, 2024
1 parent baf62fd commit 620fb24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/v0/destinations/salesforce/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const salesforceResponseHandler = (destResponse, sourceMessage, authKey, authori
// ref : https://help.salesforce.com/s/articleView?id=000387190&type=1
if (matchErrorCode('SERVER_UNAVAILABLE')) {
throw new ThrottledError(
`${DESTINATION} Request Failed: ${status} - due to Search unavailable, ${sourceMessage}`,
`${DESTINATION} Request Failed: ${status} - due to ${getErrorMessage(response)}, ${sourceMessage}`,
destResponse,
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export const testScenariosForV1API: ProxyV1TestData[] = [
body: {
output: {
message:
'Salesforce Request Failed: 503 - due to Search unavailable, during Salesforce Response Handling',
'Salesforce Request Failed: 503 - due to Server Unavailable, during Salesforce Response Handling',
response: [
{
error: '[{"message":"Server Unavailable","errorCode":"SERVER_UNAVAILABLE"}]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const legacyTests = [
output: {
status: 429,
message:
'Salesforce Request Failed: 503 - due to Search unavailable, during Salesforce Response Handling',
'Salesforce Request Failed: 503 - due to Server Unavailable, during Salesforce Response Handling',
destinationResponse: {
response: [
{
Expand Down

0 comments on commit 620fb24

Please sign in to comment.