modified error.rb to accept custome errors in table