-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): pull release/v1.31.0 into main (#2237)
- Loading branch information
Showing
65 changed files
with
1,929 additions
and
459 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
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
* @rudderlabs/integrations-platform @sivashanmukh @lvrach | ||
__tests__/ @rudderlabs/integrations | ||
* @rudderlabs/integrations-platform @sivashanmukh | ||
__tests__/ @rudderlabs/integrations @rudderlabs/data-management | ||
__mocks__/ @rudderlabs/integrations | ||
v0/ @rudderlabs/integrations | ||
cdk/ @rudderlabs/integrations | ||
src/features.json @rudderlabs/integrations | ||
constants/ @rudderlabs/integrations | ||
warehouse/ @rudderlabs/warehouse | ||
src/util/ @rudderlabs/data-management |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,4 +81,5 @@ async function processCdkV1(destType, parsedEvent) { | |
|
||
module.exports = { | ||
processCdkV1, | ||
getErrorInfo, | ||
}; |
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,78 @@ | ||
/* eslint-disable max-classes-per-file */ | ||
import { MessageDetails, StatusCode } from "./types"; | ||
|
||
export class ErrorDetailsExtractor { | ||
status: StatusCode; | ||
|
||
messageDetails: MessageDetails; | ||
|
||
constructor (builder: ErrorDetailsExtractorBuilder) { | ||
this.status = builder.getStatus(); | ||
this.messageDetails = builder.getMessageDetails(); | ||
} | ||
|
||
} | ||
|
||
export class ErrorDetailsExtractorBuilder { | ||
status: StatusCode; | ||
|
||
messageDetails: MessageDetails; | ||
|
||
constructor() { | ||
this.status = 0; | ||
this.messageDetails = {}; | ||
} | ||
|
||
setStatus(status: number): ErrorDetailsExtractorBuilder { | ||
this.status = status; | ||
return this; | ||
} | ||
|
||
/** | ||
* This means we need to set a message from a specific field that we see from the destination's response | ||
* | ||
* @param {string} fieldPath -- Path of the field which should be set as "error message" | ||
* @returns | ||
*/ | ||
setMessageField(fieldPath: string): ErrorDetailsExtractorBuilder { | ||
if (this.messageDetails?.message) { | ||
// This check basically ensures that "setMessage" was not already before | ||
return this; | ||
} | ||
this.messageDetails = { | ||
field: fieldPath | ||
} | ||
return this; | ||
} | ||
|
||
/** | ||
* This means we need to set the message provided | ||
* | ||
* @param {string} msg - error message | ||
* @returns | ||
*/ | ||
setMessage(msg: string): ErrorDetailsExtractorBuilder { | ||
if (this.messageDetails?.field) { | ||
// This check basically ensures that "setMessageField" was not already called before | ||
return this; | ||
} | ||
this.messageDetails = { | ||
message: msg | ||
} | ||
return this; | ||
} | ||
|
||
build(): ErrorDetailsExtractor { | ||
return new ErrorDetailsExtractor(this) | ||
} | ||
|
||
getStatus(): number { | ||
return this.status; | ||
} | ||
|
||
getMessageDetails(): Record<string, string> { | ||
return this.messageDetails; | ||
} | ||
} | ||
|
||
|
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,2 @@ | ||
export type MessageDetails = Record<string, string>; | ||
export type StatusCode = number; |
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.