mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 15:38:02 +08:00
FIX: show invite validation error message in response
This commit is contained in:
@ -76,7 +76,7 @@ class InvitesController < ApplicationController
|
||||
else
|
||||
render json: failed_json, status: 422
|
||||
end
|
||||
rescue Invite::UserExists => e
|
||||
rescue Invite::UserExists, ActiveRecord::RecordInvalid => e
|
||||
render json: {errors: [e.message]}, status: 422
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user