Skip to content

Commit

Permalink
SQL-211 handle title conflict on update
Browse files Browse the repository at this point in the history
  • Loading branch information
milt committed Nov 28, 2023
1 parent e0653a3 commit 8d85b91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/lrsql/admin/interceptors/reaction.clj
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@
:response
{:status 404
:body {:error (format "The reaction \"%s\" does not exist!"
(u/uuid->str reaction-id))}}))))}))
(u/uuid->str reaction-id))}})
(= :lrsql.reaction/title-conflict-error result)
(assoc (chain/terminate ctx)
:response
{:status 400
:body {:error (format "Title \"%s\" is already in use."
title)}}))))}))

(def delete-reaction
"Delete a reaction."
Expand Down

0 comments on commit 8d85b91

Please sign in to comment.