Skip to content

Commit

Permalink
fix: removing console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Jan 24, 2024
1 parent c4e7c09 commit 58e317a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 54 deletions.
1 change: 0 additions & 1 deletion src/v0/destinations/marketo_bulk_upload/fetchJobStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const responseHandler = async (event, type) => {

const { config } = event;
const accessToken = await getAccessToken(config);
console.log('access token in fetching job status', accessToken);

/**
* {
Expand Down
2 changes: 0 additions & 2 deletions src/v0/destinations/marketo_bulk_upload/fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ const getImportID = async (input, config, accessToken, csvHeader) => {
*/
const responseHandler = async (input, config) => {
const accessToken = await getAccessToken(config);
console.log('access token while uploading', accessToken);
/**
{
"importId" : <some-id>,
Expand All @@ -243,7 +242,6 @@ const responseHandler = async (input, config) => {
accessToken,
headerForCsv,
);
console.log('import ID', importId);
// if upload is successful
if (importId) {
const csvHeader = headerForCsv.toString();
Expand Down
1 change: 0 additions & 1 deletion src/v0/destinations/marketo_bulk_upload/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const { POLL_ACTIVITY } = require('./config');

const getPollStatus = async (event) => {
const accessToken = await getAccessToken(event.config);
console.log('accesstoken while polling', accessToken);
const { munchkinId } = event.config;

// To see the status of the import job polling is done
Expand Down
50 changes: 0 additions & 50 deletions src/v0/destinations/marketo_bulk_upload/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,55 +142,6 @@ const getAccessTokenURL = (config) => {

// Fetch access token from client id and client secret
// DOC: https://developers.marketo.com/rest-api/authentication/
// const getAccessToken = async (config) =>
// authCache.get(getAccessTokenCacheKey(config), async () => {
// const url = getAccessTokenURL(config);
// const { processedResponse: accessTokenResponse } = await handleHttpRequest('get', url, {
// destType: 'marketo_bulk_upload',
// feature: 'transformation',
// });

// // sample response : {response: '[ENOTFOUND] :: DNS lookup failed', status: 400}
// if (!isHttpStatusSuccess(accessTokenResponse.status)) {
// throw new NetworkError(
// `Could not retrieve authorisation token due to error ${accessTokenResponse}`,
// hydrateStatusForServer(accessTokenResponse.status, FETCH_ACCESS_TOKEN),
// {
// [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(accessTokenResponse.status),
// },
// accessTokenResponse,
// );
// }
// if (accessTokenResponse.response?.success === false) {
// handleCommonErrorResponse(
// accessTokenResponse,
// ACCESS_TOKEN_FETCH_ERR_MSG,
// FETCH_ACCESS_TOKEN,
// config,
// );
// }

// // when access token is present
// if (accessTokenResponse.response.access_token) {
// /* 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":"dummy@scope.com"}
// wherein "expires_in":0 denotes that we should refresh the accessToken but its not expired yet.
// */
// if (accessTokenResponse.response?.expires_in === 0) {
// throw new RetryableError(
// `Request Failed for marketo_bulk_upload, Access Token Expired (Retryable).`,
// 500,
// );
// }
// return accessTokenResponse.response.access_token;
// }
// throw new AbortedError(
// `Could not retrieve authorisation token due to error ${accessTokenResponse}`,
// 400,
// );
// });

const getAccessToken = async (config) => {
const url = getAccessTokenURL(config);
const { processedResponse: accessTokenResponse } = await handleHttpRequest('get', url, {
Expand Down Expand Up @@ -286,7 +237,6 @@ const handlePollResponse = (pollStatus) => {
});

if (pollStatus.response?.result?.length > 0) {
console.log('poll status is ', JSON.stringify(pollStatus));
return pollStatus.response;
}
}
Expand Down

0 comments on commit 58e317a

Please sign in to comment.