You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/APNSCore/APNSError.swift
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,7 @@ public struct APNSError: Error {
54
54
case internalServerError
55
55
case serviceUnavailable
56
56
case shutdown
57
+
case badEnvironmentKeyInToken
57
58
case unknown(String)
58
59
59
60
publicinit(rawValue:RawValue){
@@ -116,6 +117,8 @@ public struct APNSError: Error {
116
117
self=.serviceUnavailable
117
118
case"Shutdown":
118
119
self=.shutdown
120
+
case"BadEnvironmentKeyInToken":
121
+
self=.badEnvironmentKeyInToken
119
122
default:
120
123
self=.unknown(rawValue)
121
124
}
@@ -181,6 +184,8 @@ public struct APNSError: Error {
181
184
return"ServiceUnavailable"
182
185
case.shutdown:
183
186
return"Shutdown"
187
+
case.badEnvironmentKeyInToken:
188
+
return"BadEnvironmentKeyInToken"
184
189
case.unknown(let string):
185
190
return string
186
191
}
@@ -246,8 +251,10 @@ public struct APNSError: Error {
246
251
return"The service is unavailable"
247
252
case.shutdown:
248
253
return"The server is shutting down"
249
-
case.unknown:
250
-
return"Indicates an error reason that is unknown to `APNSwift`. If you receive this please file an issue so that we can extend the known error reasons"
254
+
case.badEnvironmentKeyInToken:
255
+
return"Environment mismatch between key and APNs endpoint"
256
+
case.unknown(let string):
257
+
return"Indicates an error reason that is unknown value \"\(string)\" to `APNSwift`. If you receive this please file an issue so that we can extend the known error reasons"
251
258
}
252
259
}
253
260
}
@@ -379,7 +386,11 @@ public struct APNSError: Error {
0 commit comments