-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:rudderlabs/rudder-transformer into …
…chore.merge.main
- Loading branch information
Showing
8 changed files
with
112 additions
and
9 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## What are the changes introduced in this PR? | ||
|
||
Write a brief explainer on your code changes. | ||
|
||
## Please explain the objectives of your changes below | ||
|
||
Put down any required details on the broader aspect of your changes. If there are any dependent changes, **mandatorily** mention them here | ||
|
||
### Type of change | ||
|
||
If the pull request is a **bug-fix**, **enhancement** or a **refactor**, please fill in the details on the changes made. | ||
|
||
- Existing capabilities/behavior | ||
|
||
- New capabilities/behavior | ||
|
||
If the pull request is a **new feature**, | ||
|
||
### Any technical or performance related pointers to consider with the change? | ||
|
||
N/A | ||
|
||
### Any new dependencies introduced with this change? | ||
|
||
N/A | ||
|
||
### Any new generic utility introduced or modified. Please explain the changes. | ||
|
||
N/A | ||
|
||
### If the PR has changes in more than 10 files, please mention why the changes were not split into multiple PRs. | ||
|
||
N/A | ||
|
||
### If multiple linear tasks are associated with the PR changes, please elaborate on the reason: | ||
|
||
N/A | ||
|
||
<hr> | ||
|
||
### Developer checklist | ||
|
||
- [ ] **No breaking changes are being introduced.** | ||
|
||
- [ ] Are all related docs linked with the PR? | ||
|
||
- [ ] Are all changes manually tested? | ||
|
||
- [ ] Does this change require any documentation changes? | ||
|
||
- [ ] Are relevant unit and component test-cases added? | ||
|
||
### Reviewer checklist | ||
|
||
- [ ] Is the type of change in the PR title appropriate as per the changes? | ||
|
||
- [ ] Verified that there are no credentials or confidential data exposed with the changes. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); | ||
const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); | ||
const { OAUTH } = require('../salesforce/config'); | ||
const { salesforceResponseHandler } = require('../salesforce/utils'); | ||
|
||
const responseHandler = (destinationResponse, destType) => { | ||
const message = `Request for destination: ${destType} Processed Successfully`; | ||
|
||
salesforceResponseHandler( | ||
destinationResponse, | ||
'during Salesforce Response Handling', | ||
destinationResponse?.rudderJobMetadata?.destInfo?.authKey, | ||
OAUTH | ||
); | ||
|
||
// else successfully return status as 200, message and original destination response | ||
return { | ||
status: 200, | ||
message, | ||
destinationResponse, | ||
}; | ||
}; | ||
|
||
function networkHandler() { | ||
this.responseHandler = responseHandler; | ||
this.proxy = proxyRequest; | ||
this.prepareProxy = prepareProxyRequest; | ||
this.processAxiosResponse = processAxiosResponse; | ||
} | ||
|
||
module.exports = { | ||
networkHandler, | ||
}; |
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