# Canned replies should require titles to be unique

**URL:** <https://meta.discourse.org/t/canned-replies-should-require-titles-to-be-unique/103996>\
**Category:** Feature\
**Tags:** pr-welcome, canned-replies\
**Created:** [11 december 2018 om 11:59 UTC](https://meta.discourse.org/t/canned-replies-should-require-titles-to-be-unique/103996 "2018-12-11T11:59:56Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![nsuchy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nsuchy/32/166530_2.png) [@nsuchy](https://meta.discourse.org/u/nsuchy)\
**Post date:** [12 december 2018 om 22:06 UTC](https://meta.discourse.org/t/canned-replies-should-require-titles-to-be-unique/103996/11 "2018-12-12T22:06:21Z")

</div>

An update on my progress:

The API now only adds the reply if the title isn’t already in use.  
[https://github.com/nsuchy/discourse-canned-replies/commit/6fe13c5b868e94d273c3abda1d6b3d006c0a7efd](https://github.com/nsuchy/discourse-canned-replies/commit/6fe13c5b868e94d273c3abda1d6b3d006c0a7efd)

I’m not exactly sure where to start with the UI and displaying an error. Currently (this can be easily changed), the API returns `{error: 'Title already in use!'}` but the UI doesn’t react to it and the status code is still 200. While debugging a few times I got status code 500s and the UI did react to that as expected how can I go about sending a specific status code then changing the error message? Any guidance on that would be appreciated.

@jtbayly I’ll look into the actual migration steps and implementation soon 🙂

---

_[View the full topic](https://meta.discourse.org/t/canned-replies-should-require-titles-to-be-unique/103996)._
