exactly 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Exactly
2
- class ExactlyError < StandardError
2
+ class ExactlyError < RuntimeError
3
3
  attr_reader :response
4
4
  def initialize(response)
5
5
  @response = response
@@ -7,6 +7,8 @@ module Exactly
7
7
  end
8
8
  end
9
9
 
10
+ class SoapFaultError < RuntimeError; end
11
+
10
12
  class UpsertDataExtensionFailed < ExactlyError
11
13
  def message
12
14
  @response.to_hash[:update_response][:results][:status_message]
@@ -58,6 +60,8 @@ module Exactly
58
60
  if response.to_hash[:create_response][:overall_status] != 'OK'
59
61
  raise Exactly::UpsertSubscriberFailed.new(response)
60
62
  end
63
+ rescue Savon::SOAP::Fault => ex
64
+ raise Exactly::SoapFaultError, "Error: Could not upsert subscriber #{customer_key}/#{email} to ExactTarget: #{ex.message}"
61
65
  end
62
66
 
63
67
  def upsert_data_extension(customer_key, properties)
@@ -1,3 +1,3 @@
1
1
  module Exactly
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exactly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-19 00:00:00.000000000 Z
12
+ date: 2013-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon