-
Notifications
You must be signed in to change notification settings - Fork 651
Open
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard 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
According to the EmailTemplateContent type definition, the subject field is marked as optional.
However, when creating an AWS SES template without providing a subject, SES returns an error and rejects the request.
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
v22.21.1
Reproduction Steps
await client.send(new CreateEmailTemplateCommand({
TemplateName: 'Name',
TemplateContent: {
Text: 'text',
},
}));Observed Behavior
AWS SES rejects templates without a subject, returning an error
"errorType": "BadRequestException",
"errorMessage": "The subject must be specified.",Expected Behavior
Templates should be accepted when the subject field is omitted, as indicated by the optional type definition.
Possible Solution
Either the subject field is truly optional (which I believe it should be), and the API call should succeed without providing one, or the type definition should be updated to mark it as required.
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard 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.