Skip to content

Commit 4fab69f

Browse files
[FSSDK-12148] condition fix
1 parent ab38fe3 commit 4fab69f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

OptimizelySDK/Event/Dispatcher/WebRequestEventDispatcher35.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ private void DispatchWithRetry(LogEvent logEvent)
7777
}
7878

7979
response = (HttpWebResponse)request.GetResponse();
80+
var statusCode = (int)response.StatusCode;
8081

81-
if (response.StatusCode == HttpStatusCode.OK)
82+
// Check for any 2xx success status code (200-299)
83+
if (statusCode >= 200 && statusCode < 300)
8284
{
8385
using (var responseStream = response.GetResponseStream())
8486
using (var responseReader =

0 commit comments

Comments
 (0)