Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19300 fix #772

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

19300 fix #772

wants to merge 10 commits into from

Conversation

kumardeepak5
Copy link
Contributor

Purpose

Resolves wso2/product-is#19300

Goals

This PR eliminates an unnecessary error log when a user tries to add an email template type that already exists in the system.

Behavior After Fix:
Sample Request:

curl --location 'https://localhost:9443/t/carbon.super/api/server/v1/email/template-types' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <username:password>' \
--data '{
  "displayName": "Account Confirmation1",
  "templates": [
    {
      "contentType": "text/html",
      "subject": "WSO2 - Account Confirmation",
      "body": "HTML Body",
      "footer": "WSO2 Identity Server Team",
      "id": "en_US1"
    }
  ]
}'

Sample Response
Response Code - 409

{
    "code": "ETM-50005",
    "message": "Email Template Type already exists in the system.",
    "description": "An email template type for the provided template display name already exists in the system.",
    "traceId": "91104c8e-731b-40de-9a3b-4cb178f0c755"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log an error on carbon logs when adding an email template with existing name
1 participant