adobe / experience-platform-streaming-connect

Experience platform Streaming Connectors for Data Ingress
Apache License 2.0
23 stars 20 forks source link

Non Evaluation of Errors #62

Closed timage22 closed 4 weeks ago

timage22 commented 6 months ago

When trying to connect the AEP Sink Connector to the AEP Cloud, we noticed a problem. The connector only checks for errors in HTTP communication. So if the communication is technically OK and a 2xx code is returned, the response from the AEP Cloud is not evaluated further. However, if the AEP Cloud detects an error in the sent data, it sends back an error code 400 in the response, for example. There are now 2 problems here

  1. the error is only logged at debug level.
  2. the error is not responded to at all.

in the file:

java/com/adobe/platform/streaming/sink/impl/AEPPublisher.java

from line 80 . the problem with the debug logging is the following line : ~ line 90 -> 92

LOG.debug("Successfully published data to Adobe Experience Platform: {}", response);

Unfortunately, the response object is not evaluated here and is only written to the debug log.

arobsco commented 2 months ago

This issue is also affecting us:

[DEBUG] 2024-04-12 09:23:09,319 [task-thread-customer-communication-connector-0] com.adobe.platform.streaming.sink.impl.AEPPublisher publishData - Successfully published data to Adobe Experience Platform: {"inletId":"xxx","batchId":"xxx","receivedTimeMs":1712913789278,"responses":[{"status":400,"message":"The 'header' field is mandatory. Provide a valid 'header' value and try again."}]} [DEBUG] 2024-04-12 09:23:09,319 [task-thread-customer-communication-connector-0] com.adobe.platform.streaming.sink.impl.AEPPublisher publishData - Successfully published data to Adobe Experience Platform: {"inletId":"xxx","batchId":"xxx","receivedTimeMs":1712913789278,"responses":[{"status":400,"message":"The 'header' field is mandatory. Provide a valid 'header' value and try again."}]}

Sink Connector is returning a successful message despite the API returning a 400 error message

vivetiwa commented 4 weeks ago

Fixed as part of PR - https://github.com/adobe/experience-platform-streaming-connect/pull/69