mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 14:48:03 +08:00
FIX: rescue specific errors on invite failure
This commit is contained in:
@ -74,7 +74,7 @@ class InvitesController < ApplicationController
|
||||
else
|
||||
render json: failed_json, status: 422
|
||||
end
|
||||
rescue => e
|
||||
rescue Invite::UserExists => e
|
||||
render json: {errors: [e.message]}, status: 422
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user