expo-push 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75823542cbe534c4fc5ea5b689561375bc207ac290a940fcf7a910551b07ed19
4
- data.tar.gz: 1af5961433f78e43d38759a93d69141487b973412273a975703be3cc49d05055
3
+ metadata.gz: cc14e8aab346fa0e3a0f4c9d70ad1d33b555ba2c98eac5d564e49798c494506f
4
+ data.tar.gz: f2117ab9127755e7e86b51de569a54778b3b9c2c9f473e3e65711b116f581448
5
5
  SHA512:
6
- metadata.gz: d8d06b6e15df152bf1f6a07bb8d8b948fa3bca1bf47c3afacc8f1c8ff6c1d1b4af8ffd71b4419194b3fffb3883c35dac44d45f6ddebf8f781e6826756445a2e1
7
- data.tar.gz: 5b4a2ed5d16c6b950d4560e4b83363e69d61d320b18c2e114496be7a895cfec08da802953fcac10524d37e2e504660489229dda98e63970c82e7923a0aa09697
6
+ metadata.gz: bcaf8fd5b75dc98c92116eba48a1ed4d1ecdda4ba2f26382446856af0f9545e56c223504e8c4423a7a94ce10e22421732ae2c7ed73253a6e17e0849cff7d014a
7
+ data.tar.gz: 16e0dad398db32079054f5bd163d9e8e044c3b190d11b8359cf12870a50dee9650f9f55366e47819a4bc58c648c08be753c744e612214e0fd695b60f78eda6b8
@@ -1,3 +1,3 @@
1
1
  module Exponent
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
data/lib/expo-push.rb CHANGED
@@ -118,14 +118,17 @@ module Exponent
118
118
 
119
119
  case response.code.to_s
120
120
  when '504'
121
- # NOTE: Raise specific error so app knows to retry the request.
122
121
  raise Exponent::Push::GatewayTimeoutError.new(
123
- "Request timed out: #{response.code} #{response.response_body}"
122
+ "#{response.code} #{response.response_body}"
123
+ )
124
+ when '503'
125
+ raise Exponent::Push::UpstreamConnectError.new(
126
+ "#{response.code} #{response.response_body}"
124
127
  )
125
128
  when '502'
126
129
  # NOTE: Raise specific error so app knows to retry the request.
127
130
  raise Exponent::Push::BadGatewayError.new(
128
- "Request timed out: #{response.code} #{response.response_body}"
131
+ "#{response.code} #{response.response_body}"
129
132
  )
130
133
  when '400'
131
134
  # NOTE: The app will want to handle expo server error response differently.
@@ -259,7 +262,7 @@ module Exponent
259
262
  def self.error_names
260
263
  %w[DeviceNotRegistered MessageTooBig
261
264
  MessageRateExceeded InvalidCredentials GatewayTimeout
262
- BadGateway Unknown]
265
+ BadGateway UpstreamConnect Unknown]
263
266
  end
264
267
 
265
268
  error_names.each do |error_name|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expo-push
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Ruder