Fix incorrect error message when deleting invalid synonym.

Because P_tag was raising 404 with "no such tag" when
we know it should have been "no such synonym".
This commit is contained in:
voussoir 2018-07-28 19:14:02 -07:00
parent 22d2efa289
commit 6cb545af8b

View file

@ -140,7 +140,7 @@ def post_tag_delete_synonym():
synonym = synonym.split('+')[-1].split('.')[-1]
try:
master_tag = common.P_tag(synonym, response_type='json')
master_tag = common.P.get_tag(name=synonym)
except etiquette.exceptions.NoSuchTag as exc:
raise etiquette.exceptions.NoSuchSynonym(*exc.given_args, **exc.given_kwargs)
else: