File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Tests/SentryTests/Networking Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 55### Fixes
66
77- Properly sanitize the event context and SDK information (#1943 )
8+ - Don't send error 429 as ` network_error ` (#1957 )
89
910## 7.20.0
1011
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ - (void)sendEnvelope:(SentryEnvelope *)envelope
225225 addRequest: request
226226 completionHandler: ^(NSHTTPURLResponse *_Nullable response, NSError *_Nullable error) {
227227 // If the response is not nil we had an internet connection.
228- if (error) {
228+ if (error && response. statusCode != 429 ) {
229229 [_self recordLostEventFor: envelope.items];
230230 }
231231
Original file line number Diff line number Diff line change @@ -287,19 +287,25 @@ class SentryHttpTransportTests: XCTestCase {
287287 }
288288
289289 func testSendEventWithRetryAfterResponse( ) {
290+ fixture. requestManager. nextError = NSError ( domain: " something " , code: 12 )
291+
290292 let response = givenRetryAfterResponse ( )
291293
292294 sendEvent ( )
293295
294296 assertRateLimitUpdated ( response: response)
297+ assertClientReportNotStoredInMemory ( )
295298 }
296299
297300 func testSendEventWithRateLimitResponse( ) {
301+ fixture. requestManager. nextError = NSError ( domain: " something " , code: 12 )
302+
298303 let response = givenRateLimitResponse ( forCategory: SentryEnvelopeItemTypeSession)
299304
300305 sendEvent ( )
301306
302307 assertRateLimitUpdated ( response: response)
308+ assertClientReportStoredInMemory ( )
303309 }
304310
305311 func testSendEnvelopeWithRetryAfterResponse( ) {
You can’t perform that action at this time.
0 commit comments