Skip to content
Permalink
Browse files

api: do not pass AR not found exception messages to clients

  • Loading branch information...
aither64 committed Apr 29, 2019
1 parent 2b50f0c commit 2c8e78c65750fb2e5f8a17657854f62932725358
Showing with 1 addition and 1 deletion.
  1. +1 −1 api/lib/vpsadmin/api.rb
@@ -56,7 +56,7 @@ def self.default
if /find ([^\s]+)[^=]+=(\d+)/ =~ exception.message
ret[:message] = "object #{$~[1]} = #{$~[2]} not found"
else
ret[:message] = "object not found: #{exception.to_s}"
ret[:message] = "object not found"
end

puts "Exception ActiveRecord::RecordNotFound: #{exception.message}"

0 comments on commit 2c8e78c

Please sign in to comment.
You can’t perform that action at this time.