Skip to content

Commit

Permalink
fix: fixing network error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Jan 22, 2024
1 parent 0dbb307 commit 0a6f18e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/v0/destinations/marketo_bulk_upload/fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ const getImportID = async (input, config, accessToken, csvHeader) => {
stats.counter('marketo_bulk_upload_upload_file_unsuccJobs', unsuccessfulJobs.length);
if (!isHttpStatusSuccess(resp.status)) {
throw new NetworkError(
'Unable to upload file',
hydrateStatusForServer(resp.status, 'During fetching poll status'),
`Unable to upload file due to error : ${resp.response}`,
hydrateStatusForServer(resp.status, 'During uploading file'),
);
}
return handleFileUploadResponse(resp, successfulJobs, unsuccessfulJobs, requestTime, config);
Expand Down
2 changes: 1 addition & 1 deletion src/v0/destinations/marketo_bulk_upload/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const getPollStatus = async (event) => {
state: 'Retryable',
});
throw new NetworkError(
'Could not poll status',
`Could not poll status: due to error ${pollStatus.response}`,
hydrateStatusForServer(pollStatus.status, 'During fetching poll status'),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/v0/destinations/marketo_bulk_upload/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const getAccessToken = async (config) =>

// 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":"dummy@scope.com"}
wherein "expires_in":0 denotes that we should refresh the accessToken but its not expired yet.
Expand Down

0 comments on commit 0a6f18e

Please sign in to comment.