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

Move rescue to bottom of file

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