Commit 3363230b authored by Sean Arnold's avatar Sean Arnold

Move rescue to bottom of file

parent 76c3dee4
...@@ -45,7 +45,6 @@ module Mutations ...@@ -45,7 +45,6 @@ module Mutations
raise_schedule_not_found unless schedule raise_schedule_not_found unless schedule
begin
result = ::IncidentManagement::OncallRotations::CreateService.new( result = ::IncidentManagement::OncallRotations::CreateService.new(
schedule, schedule,
project, project,
...@@ -53,13 +52,12 @@ module Mutations ...@@ -53,13 +52,12 @@ module Mutations
create_service_params(schedule, participants, args) create_service_params(schedule, participants, args)
).execute ).execute
response(result)
rescue ActiveRecord::RecordInvalid => e rescue ActiveRecord::RecordInvalid => e
raise Gitlab::Graphql::Errors::ArgumentError, e.message raise Gitlab::Graphql::Errors::ArgumentError, e.message
end end
response(result)
end
private private
def create_service_params(schedule, participants, args) def create_service_params(schedule, participants, args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment