8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/edi/service_runner.rb', line 8
def execute
self.service = EDI::Interpreter.new(message).determine_service.new(message)
EDI::Logger.info "Service: #{service.class} invoked"
begin
_run_service
rescue EDI::UnfitEnvironmentException => e
EDI::ArrayResponder.new(EDI.config.unfit_environment_response).respond
rescue EDI::ThirdPartyAPIFailure
EDI::ArrayResponder.new(EDI.config.third_party_api_failure_respone).respond
rescue => e
EDI::ArrayResponder.new(EDI.config.standard_error_response).respond
end
end
|