From 354fe5840f2b6b43fd992bf5a3632184cd3042c3 Mon Sep 17 00:00:00 2001 From: Gauravudia Date: Fri, 2 Feb 2024 10:31:20 +0530 Subject: [PATCH] docs: add comments in response handler --- src/v0/destinations/the_trade_desk/networkHandler.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/v0/destinations/the_trade_desk/networkHandler.js b/src/v0/destinations/the_trade_desk/networkHandler.js index f01741872e..e9693e8132 100644 --- a/src/v0/destinations/the_trade_desk/networkHandler.js +++ b/src/v0/destinations/the_trade_desk/networkHandler.js @@ -66,9 +66,10 @@ const responseHandler = (destinationResponse) => { ); } - // Trade desk returns 200 with an error in case of "Failed to parse TDID, DAID, UID2, IDL, EUID, or failed to decrypt UID2Token or EUIDToken" + // Trade desk first party data api returns 200 with an error in case of "Failed to parse TDID, DAID, UID2, IDL, EUID, or failed to decrypt UID2Token or EUIDToken" // https://partner.thetradedesk.com/v3/portal/data/doc/post-data-advertiser-external // {"FailedLines":[{"ErrorCode":"MissingUserId","Message":"Invalid DAID, item #1"}]} + // For real time conversion api we don't have separate response handling, trade desk always return 400 for bad events. if ('FailedLines' in response && response.FailedLines.length > 0) { throw new AbortedError( `Request failed with status: ${status} due to ${JSON.stringify(response)}`, @@ -78,7 +79,7 @@ const responseHandler = (destinationResponse) => { } // else successfully return status, message and original destination response - // Trade desk returns 200 with empty object '{}' in response if all the events are processed successfully + // For first party api trade desk returns 200 with empty object '{}' in response if all the events are processed successfully return { status, message,