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

Move rescue to bottom of file

parent 76c3dee4
......@@ -45,19 +45,17 @@ module Mutations
raise_schedule_not_found unless schedule
begin
result = ::IncidentManagement::OncallRotations::CreateService.new(
schedule,
project,
current_user,
create_service_params(schedule, participants, args)
).execute
rescue ActiveRecord::RecordInvalid => e
raise Gitlab::Graphql::Errors::ArgumentError, e.message
end
result = ::IncidentManagement::OncallRotations::CreateService.new(
schedule,
project,
current_user,
create_service_params(schedule, participants, args)
).execute
response(result)
rescue ActiveRecord::RecordInvalid => e
raise Gitlab::Graphql::Errors::ArgumentError, e.message
end
private
......
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