-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: for debugging via dedicated transformer #3020
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,7 +153,7 @@ | |
// sample response : {response: '[ENOTFOUND] :: DNS lookup failed', status: 400} | ||
if (!isHttpStatusSuccess(accessTokenResponse.status)) { | ||
throw new NetworkError( | ||
'Could not retrieve authorisation token', | ||
`Could not retrieve authorisation token due to error ${accessTokenResponse}`, | ||
hydrateStatusForServer(accessTokenResponse.status, FETCH_ACCESS_TOKEN), | ||
{ | ||
[tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(accessTokenResponse.status), | ||
|
@@ -172,7 +172,7 @@ | |
|
||
// when access token is present | ||
if (accessTokenResponse.response.access_token) { | ||
/* This scenario will handle the case when we get the foloowing response | ||
/* This scenario will handle the case when we get the following response | ||
status: 200 | ||
respnse: {"access_token":"<dummy-access-token>","token_type":"bearer","expires_in":0,"scope":"[email protected]"} | ||
wherein "expires_in":0 denotes that we should refresh the accessToken but its not expired yet. | ||
|
@@ -185,7 +185,10 @@ | |
} | ||
return accessTokenResponse.response.access_token; | ||
} | ||
throw new AbortedError('Could not retrieve authorisation token', 400); | ||
throw new AbortedError( | ||
`Could not retrieve authorisation token due to error ${accessTokenResponse}`, | ||
400, | ||
); | ||
}); | ||
|
||
/** | ||
|
@@ -254,14 +257,18 @@ | |
if (!isHttpStatusSuccess(marketoReposnseStatus)) { | ||
logger.info('[Network Error]:Failed during fetching job status', { marketoResponse, type }); | ||
throw new NetworkError( | ||
'Unable to fetch job status', | ||
`Unable to fetch job status: due to error ${marketoResponse}`, | ||
hydrateStatusForServer(marketoReposnseStatus, 'During fetching job status'), | ||
); | ||
} | ||
|
||
if (marketoResponse?.success === false) { | ||
logger.info('[Application Error]Failed during fetching job status', { marketoResponse, type }); | ||
throw new RetryableError('Failure during fetching job status', 500, resp); | ||
throw new RetryableError( | ||
`Failure during fetching job status due to error : ${marketoResponse}`, | ||
500, | ||
resp, | ||
); | ||
} | ||
|
||
/* | ||
|
@@ -336,6 +343,7 @@ | |
resp.response?.result[0]?.importId | ||
) { | ||
const { importId } = resp.response.result[0]; | ||
console.log(importId); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should done using logger with proper message including what is the destination id etc |
||
stats.histogram('marketo_bulk_upload_upload_file_time', requestTime); | ||
|
||
stats.increment(UPLOAD_FILE, { | ||
|
@@ -394,7 +402,11 @@ | |
fieldMap[field?.name] = field?.dataType; | ||
}); | ||
} else { | ||
throw new RetryableError('Failed to fetch Marketo Field Schema', 500, fieldSchemaMapping); | ||
throw new RetryableError( | ||
`Failed to fetch Marketo Field Schema due to error ${fieldSchemaMapping}`, | ||
500, | ||
fieldSchemaMapping, | ||
); | ||
} | ||
return fieldMap; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should done using logger with proper message including what is the destination id etc