app/resolvers/decidim/comments/vote_comment_resolver.rb in decidim-comments-0.2.0 vs app/resolvers/decidim/comments/vote_comment_resolver.rb in decidim-comments-0.3.0

- old
+ new

@@ -12,9 +12,12 @@ def call(obj, _args, ctx) Decidim::Comments::VoteComment.call(obj, ctx[:current_user], weight: @weight) do on(:ok) do |comment| return comment end + on(:invalid) do + return GraphQL::ExecutionError.new(I18n.t("votes.create.error", scope: "decidim.comments")) + end end end end end end