Skip to content

Payload field is missing in response handle when it is an empty array #316

@emdobrin

Description

@emdobrin

Prerequisites

  • This is not a Security Disclosure, otherwise please follow the guidelines in Security Policy.
  • I have searched in this repository's issues to see if it has already been reported.
  • I have updated to the latest released version of the SDK and the issue still persists.

Bug summary

When the upstream returns a response event handle with payload as an empty array, the Edge extension should mirror this in the dispatched response handle.
Note: Reproducible in iOS only, Android Edge SDK works as expected.

Environment

AEPEdge 1.6.0

Steps to reproduce

No response

Current behavior

Network response example:

"requestId": "ABC",
    "handle": [
        {
            "payload": [],
            "type": "personalization:decisions",
            "eventIndex": 0
        }
    ]

Response event handle dispatched:

[
      id: BBBB
      name: AEP Response Event Handle
      type: com.adobe.eventType.edge
      source: personalization:decisions
      data: {
           "requestId" : "ABC",
           "type" : "personalization:decisions",
           "requestEventId" : "CCC"
     }
      timestamp: 2023-03-08 18:41:19 +0000
      responseId: nil
      mask: nil
    ]

Note that "payload" : [] is missing here.

Expected behavior

Expected response event handle:

[
      id: BBBB
      name: AEP Response Event Handle
      type: com.adobe.eventType.edge
      source: personalization:decisions
      data: {
           "requestId" : "ABC",
           "type" : "personalization:decisions",
           "payload": [],
           "requestEventId" : "CCC"
     }
      timestamp: 2023-03-08 18:41:19 +0000
      responseId: nil
      mask: nil
    ]

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. Used by issue templates

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions