Skip to content

Commit

Permalink
fix: comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed Apr 9, 2024
1 parent 142675f commit 986507c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/v0/destinations/sfmc/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const getToken = async (clientId, clientSecret, subdomain) => {
{
[tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(processedResponseSfmc.status || 400),

Check warning on line 60 in src/v0/destinations/sfmc/transform.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/sfmc/transform.js#L60

Added line #L60 was not covered by tests
},
JSON.stringify(processedResponseSfmc),
processedResponseSfmc.response,
);
}

Expand Down
10 changes: 4 additions & 6 deletions test/integrations/destinations/sfmc/processor/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ export const data = [
body: [
{
error:
'{"message":"Could not retrieve access token","destinationResponse":"{\\"response\\":{\\"error\\":\\"invalid_client\\",\\"error_description\\":\\"Invalid client ID. Use the client ID in Marketing Cloud Installed Packages.\\",\\"error_uri\\":\\"https://developer.salesforce.com/docs\\"},\\"status\\":401}"}',
'{"message":"Could not retrieve access token","destinationResponse":{"error":"invalid_client","error_description":"Invalid client ID. Use the client ID in Marketing Cloud Installed Packages.","error_uri":"https://developer.salesforce.com/docs"}}',
statTags: {
destType: 'SFMC',
errorCategory: 'network',
Expand Down Expand Up @@ -2059,7 +2059,7 @@ export const data = [
body: [
{
error:
'{"message":"Could not retrieve access token","destinationResponse":"{\\"response\\":{\\"message\\":\\"Your requests are temporarily blocked.\\",\\"errorcode\\":50200,\\"documentation\\":\\"https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm\\"},\\"status\\":429}"}',
'{"message":"Could not retrieve access token","destinationResponse":{"message":"Your requests are temporarily blocked.","errorcode":50200,"documentation":"https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm"}}',
statTags: {
destType: 'SFMC',
errorCategory: 'network',
Expand Down Expand Up @@ -2130,8 +2130,7 @@ export const data = [
status: 200,
body: [
{
error:
'{"message":"Could not retrieve access token","destinationResponse":"{\\"response\\":{},\\"status\\":400}"}',
error: '{"message":"Could not retrieve access token","destinationResponse":{}}',
statTags: {
destType: 'SFMC',
errorCategory: 'network',
Expand Down Expand Up @@ -2202,8 +2201,7 @@ export const data = [
status: 200,
body: [
{
error:
'{"message":"Could not retrieve access token","destinationResponse":"{\\"response\\":\\"\\",\\"status\\":500}"}',
error: 'Could not retrieve access token',
statTags: {
destType: 'SFMC',
errorCategory: 'network',
Expand Down

0 comments on commit 986507c

Please sign in to comment.