mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
Changed error format on template subject duplication error
This commit is contained in:
@@ -44,7 +44,7 @@ def create_template(service_id):
|
||||
message = "Failed to create template"
|
||||
if "templates_subject_key" in str(ex):
|
||||
message = 'Duplicate template subject'
|
||||
return jsonify(result="error", message=message), 400
|
||||
return jsonify(result="error", message=[{'subject': message}]), 400
|
||||
return jsonify(result="error", message=message), 500
|
||||
|
||||
return jsonify(data=template_schema.dump(new_template).data), 201
|
||||
|
||||
Reference in New Issue
Block a user