Skip to content

Unable to set header_url when creating a template with a HEADER component and format of VIDEO #256

@hgbrown

Description

@hgbrown

When creating a template with a HEADER component and a format of VIDEO, you cannot set a header_url in the example due to the following validation in HSMComponent.java:168-174:

private void checkHeaderUrl() throws IllegalArgumentException {
    if (!(type.equals(HSMComponentType.HEADER)
        && format.equals(HSMComponentFormat.IMAGE))
    ) {
      throw new IllegalArgumentException("\"header_url\" is available for only HEADER type and IMAGE format.");
    }
  }

However, you can send an HTTP request with these values which will succeed:

    {
      "type": "HEADER",
      "format": "VIDEO",
      "example": {
        "header_url": [
          "https://gvipublic.s3.af-south-1.amazonaws.com/ZZZ022/delivery+design.mp4"
        ]
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions