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 +4 -4
- data/lib/expo-push/version.rb +1 -1
- data/lib/expo-push.rb +7 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc14e8aab346fa0e3a0f4c9d70ad1d33b555ba2c98eac5d564e49798c494506f
|
4
|
+
data.tar.gz: f2117ab9127755e7e86b51de569a54778b3b9c2c9f473e3e65711b116f581448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcaf8fd5b75dc98c92116eba48a1ed4d1ecdda4ba2f26382446856af0f9545e56c223504e8c4423a7a94ce10e22421732ae2c7ed73253a6e17e0849cff7d014a
|
7
|
+
data.tar.gz: 16e0dad398db32079054f5bd163d9e8e044c3b190d11b8359cf12870a50dee9650f9f55366e47819a4bc58c648c08be753c744e612214e0fd695b60f78eda6b8
|
data/lib/expo-push/version.rb
CHANGED
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
|
-
"
|
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
|
-
"
|
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|
|