mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 12:34:42 +08:00
FIX: LocalJumpError : unexpected return (#18114)
This commit is contained in:
@ -630,12 +630,13 @@ class GroupsController < ApplicationController
|
|||||||
.permit(:host, :port, :username, :password, :ssl, :debug)
|
.permit(:host, :port, :username, :password, :ssl, :debug)
|
||||||
EmailSettingsValidator.validate_as_user(current_user, "imap", **final_settings.to_h.symbolize_keys)
|
EmailSettingsValidator.validate_as_user(current_user, "imap", **final_settings.to_h.symbolize_keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
render json: success_json
|
||||||
rescue *EmailSettingsExceptionHandler::EXPECTED_EXCEPTIONS, StandardError => err
|
rescue *EmailSettingsExceptionHandler::EXPECTED_EXCEPTIONS, StandardError => err
|
||||||
return render_json_error(
|
render_json_error(
|
||||||
EmailSettingsExceptionHandler.friendly_exception_message(err, email_host)
|
EmailSettingsExceptionHandler.friendly_exception_message(err, email_host)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
render json: success_json
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user