Seeing status 500 after duplicated user
Created by: RobinQu
After trying to create a duplicate user:
ActiveRecord::RecordNotUnique (Mysql2::Error: Duplicate entry '[email protected]' for key 'index_users_on_email': INSERT INTO `users` (`admin`, `authentication_token`, `avatar`, `bio`, `can_create_group`, `can_create_team`, `color_scheme_id`, `confirmation_sent_at`, `confirmation_token`, `confirmed_at`, `created_at`, `created_by_id`, `current_sign_in_at`, `current_sign_in_ip`, `email`, `encrypted_password`, `extern_uid`, `failed_attempts`, `last_sign_in_at`, `last_sign_in_ip`, `linkedin`, `locked_at`, `name`, `notification_level`, `password_expires_at`, `projects_limit`, `provider`, `remember_created_at`, `reset_password_sent_at`, `reset_password_token`, `sign_in_count`, `skype`, `state`, `theme_id`, `twitter`, `unconfirmed_email`, `updated_at`, `username`) VALUES (0, 'p3Jz3pydvqXNQqCJowkU', NULL, NULL, 1, 1, 1, NULL, NULL, '2013-12-19 09:38:15', '2013-12-19 09:38:15', 1, NULL, NULL, '[email protected]', '$2a$10$ETMKGw.3pSurpDyi.jokEe5LmU45zgfAgjKwr.C03fkhne6SfPjry', NULL, 0, NULL, NULL, '', NULL, 'haolin', 1, '2013-12-19 09:38:14', 10, NULL, NULL, NULL, NULL, 0, '', 'active', 2, '', NULL, '2013-12-19 09:38:15', 'haolin')):
app/controllers/admin/users_controller.rb:51:in `create'
app/controllers/application_controller.rb:54:in `set_current_user_for_thread'
I was hoping to see a more friendly tip instead of a 500-status page.