Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #2867 by catching the error and redirecting #2992

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions apps/dashboard/app/controllers/support_ticket_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ class SupportTicketController < ApplicationController
# GET /support?session_id=<session_UUID>
# session_id [UUID] optional session to add data to the support ticket
def new
support_service = create_service_class
@support_ticket = support_service.default_support_ticket(params)
begin
support_service = create_service_class
@support_ticket = support_service.default_support_ticket(params)

render get_ui_template
render get_ui_template
rescue StandardError => e
redirect_to(root_url, flash: { alert: e.message })
end
end

# POST /support
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/app/models/user_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def support_ticket_service
return SupportTicketEmailService.new(support_ticket) if support_ticket[:email]
return SupportTicketRtService.new(support_ticket) if support_ticket[:rt_api]

raise StandardError, 'No support ticket service class configured'
raise StandardError, "support_ticket is misconfigured. 'email' or 'rt_api' sections are required."
end

# The current user profile. Used to select the configuration properties.
Expand Down