-
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.
fix: show destinationReesponse in error msg for v1 proxy
- Loading branch information
1 parent
90c725e
commit 7d6e04f
Showing
3 changed files
with
225 additions
and
3 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
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 |
---|---|---|
|
@@ -632,7 +632,7 @@ export const data = [ | |
output: { | ||
response: [ | ||
{ | ||
error: 'Request failed for braze with status: 401', | ||
error: '{"code":400,"message":"Bad Req","status":"Fail Case"}', | ||
statusCode: 401, | ||
metadata: { | ||
jobId: 2, | ||
|
@@ -664,4 +664,179 @@ export const data = [ | |
}, | ||
}, | ||
}, | ||
{ | ||
name: 'braze', | ||
description: | ||
'Test Transformer Proxy V1 input with v0 proxy handler Error returned Multiple metadata Track Event', | ||
feature: 'dataDelivery', | ||
module: 'destination', | ||
version: 'v1', | ||
input: { | ||
request: { | ||
body: { | ||
type: 'REST', | ||
endpoint: 'https://rest.iad-03.braze.com/users/track/testV1', | ||
method: 'POST', | ||
userId: 'gabi_userId_45', | ||
headers: { | ||
Accept: 'application/json', | ||
Authorization: 'Bearer api_key', | ||
'Content-Type': 'application/json', | ||
}, | ||
body: { | ||
FORM: {}, | ||
JSON: { | ||
partner: 'RudderStack', | ||
attributes: [ | ||
{ | ||
email: '[email protected]', | ||
city: 'Disney', | ||
country: 'USA', | ||
firstname: 'Mickey', | ||
external_id: '456345345', | ||
}, | ||
{ | ||
email: '[email protected]', | ||
city: 'Disney', | ||
country: 'USA', | ||
firstname: 'Mickey', | ||
external_id: '456345345', | ||
}, | ||
{ | ||
email: '[email protected]', | ||
city: 'Disney', | ||
country: 'USA', | ||
firstname: 'Mickey', | ||
external_id: '456345345', | ||
}, | ||
], | ||
}, | ||
JSON_ARRAY: {}, | ||
XML: {}, | ||
}, | ||
metadata: [ | ||
{ | ||
jobId: 2, | ||
attemptNum: 0, | ||
userId: '', | ||
sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
secret: { | ||
access_token: 'secret', | ||
refresh_token: 'refresh', | ||
developer_token: 'developer_Token', | ||
}, | ||
}, | ||
{ | ||
jobId: 3, | ||
attemptNum: 0, | ||
userId: '', | ||
sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
secret: { | ||
access_token: 'secret', | ||
refresh_token: 'refresh', | ||
developer_token: 'developer_Token', | ||
}, | ||
}, | ||
{ | ||
jobId: 4, | ||
attemptNum: 0, | ||
userId: '', | ||
sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
secret: { | ||
access_token: 'secret', | ||
refresh_token: 'refresh', | ||
developer_token: 'developer_Token', | ||
}, | ||
}, | ||
], | ||
files: {}, | ||
params: { | ||
destination: 'braze', | ||
}, | ||
}, | ||
method: 'POST', | ||
}, | ||
}, | ||
output: { | ||
response: { | ||
status: 200, | ||
body: { | ||
output: { | ||
response: [ | ||
{ | ||
error: | ||
'{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', | ||
statusCode: 401, | ||
metadata: { | ||
jobId: 2, | ||
attemptNum: 0, | ||
userId: '', | ||
sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
secret: { | ||
access_token: 'secret', | ||
refresh_token: 'refresh', | ||
developer_token: 'developer_Token', | ||
}, | ||
}, | ||
}, | ||
{ | ||
error: | ||
'{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', | ||
statusCode: 401, | ||
metadata: { | ||
jobId: 3, | ||
attemptNum: 0, | ||
userId: '', | ||
sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
secret: { | ||
access_token: 'secret', | ||
refresh_token: 'refresh', | ||
developer_token: 'developer_Token', | ||
}, | ||
}, | ||
}, | ||
{ | ||
error: | ||
'{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', | ||
statusCode: 401, | ||
metadata: { | ||
jobId: 4, | ||
attemptNum: 0, | ||
userId: '', | ||
sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
secret: { | ||
access_token: 'secret', | ||
refresh_token: 'refresh', | ||
developer_token: 'developer_Token', | ||
}, | ||
}, | ||
}, | ||
], | ||
statTags: { | ||
destType: 'BRAZE', | ||
destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', | ||
errorCategory: 'network', | ||
errorType: 'aborted', | ||
feature: 'dataDelivery', | ||
implementation: 'native', | ||
module: 'destination', | ||
workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
]; |
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 |
---|---|---|
|
@@ -420,5 +420,48 @@ const deleteNwData = [ | |
status: 401, | ||
}, | ||
}, | ||
{ | ||
httpReq: { | ||
url: 'https://rest.iad-03.braze.com/users/track/testV1', | ||
data: { | ||
partner: 'RudderStack', | ||
attributes: [ | ||
{ | ||
email: '[email protected]', | ||
city: 'Disney', | ||
country: 'USA', | ||
firstname: 'Mickey', | ||
external_id: '456345345', | ||
}, | ||
{ | ||
email: '[email protected]', | ||
city: 'Disney', | ||
country: 'USA', | ||
firstname: 'Mickey', | ||
external_id: '456345345', | ||
}, | ||
{ | ||
email: '[email protected]', | ||
city: 'Disney', | ||
country: 'USA', | ||
firstname: 'Mickey', | ||
external_id: '456345345', | ||
}, | ||
], | ||
}, | ||
params: { destination: 'braze' }, | ||
headers: { | ||
Accept: 'application/json', | ||
Authorization: 'Bearer api_key', | ||
'Content-Type': 'application/json', | ||
'User-Agent': 'RudderLabs', | ||
}, | ||
method: 'POST', | ||
}, | ||
httpRes: { | ||
data: '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', | ||
status: 401, | ||
}, | ||
}, | ||
]; | ||
export const networkCallsData = [...deleteNwData, ...dataDeliveryMocksData]; |