Fix lint error; use fail message for relationship create failures

This commit is contained in:
Karina Kwiatek 2022-01-19 19:26:39 +01:00 committed by Karina Kwiatek
parent 8d59ef9398
commit 29d46b43db
1 changed files with 3 additions and 3 deletions

View File

@ -17,8 +17,8 @@ class Ajax::RelationshipController < AjaxController
)
@response[:success] = true
@response[:message] = t("messages.friend.create.okay")
rescue Errors::Base => e
@response[:message] = t(e.locale_tag)
rescue Errors::Base
@response[:message] = t("messages.answer.create.fail")
ensure
return_response
end
@ -31,7 +31,7 @@ class Ajax::RelationshipController < AjaxController
)
@response[:success] = true
@response[:message] = t("messages.friend.destroy.okay")
rescue Errors::Base => e
rescue Errors::Base
@response[:message] = t("messages.friend.destroy.fail")
ensure
return_response