-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
bugThis issue is a bug.This issue is a bug.p3This is a minor priority issueThis is a minor priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
I wrote a script that is going to create 250 email templates in Pinpoint.
Here is the input for the CreateEmailTemplateCommand that returns a "200 - Created" :
const input = {
EmailTemplateRequest: {
HtmlPart: '<p>Lorem Ipsum</p>',
Subject: templateName,
Headers: [
{
Name: 'List-Unsubscribe',
Value:
'<mailto:*****@***.***>,<https://**********/pinpoint/unsubscribe/{{Address}}>',
},
{
Name: 'List-Unsubscribe-Post',
Value: 'List-Unsubscribe=One-Click',
},
],
},
TemplateName: templateName,
};
But when I go check in the console, everything is good with the templates, except they have no headers set.
I also tried to add them with an UpdateEmailTemplateCommand, with no success.
Am I missing something?
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Node v20.17.0
Reproduction Steps
import { PinpointClient, CreateEmailTemplateCommand } from "@aws-sdk/client-pinpoint"; // ES Modules import
const client = new PinpointClient(config);
const input = {
EmailTemplateRequest: {
HtmlPart: '<p>Lorem Ipsum</p>',
Subject: 'templateName',
Headers: [
{
Name: 'List-Unsubscribe',
Value:
'<mailto:*****@***.***>,<https://*******.***/pinpoint/unsubscribe/{{Address}}>',
},
{
Name: 'List-Unsubscribe-Post',
Value: 'List-Unsubscribe=One-Click',
},
],
},
TemplateName: 'templateName',
};
const command = new CreateEmailTemplateCommand(input);
const response = await client.send(command);
Observed Behavior
CreateEmailTemplate command worked and returned the Created message, but the Headers part of the query was ignored and no headers were set
Expected Behavior
Headers to be taken into account and set on the template
Possible Solution
No response
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p3This is a minor priority issueThis is a minor priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.