This PR adds a new event that fires when an error was recorded and the subsequent HTTP call is successful.
Why
Our React Proxy SDK will set an error based on the error event fired from this SDK when the HTTP call fails. Without this event we have no way to effectively reset this error, because the only event that is fired consistently is the UPDATE event, which is only fired when the response is not 304. This does not cover the case when you intermittently lose connection and the next call succeeds with 304.
How
We keep track of the networkError internally in the SDK. When the state of the SDK HTTP call errors we record the error. If the error is set, and the call is successful we will emit a POST_ERROR_SUCCESS event that will allow subscribers to clear out stale errors.
This PR adds a new event that fires when an error was recorded and the subsequent HTTP call is successful.
Why
Our React Proxy SDK will set an error based on the error event fired from this SDK when the HTTP call fails. Without this event we have no way to effectively reset this error, because the only event that is fired consistently is the UPDATE event, which is only fired when the response is not 304. This does not cover the case when you intermittently lose connection and the next call succeeds with 304.
How
We keep track of the networkError internally in the SDK. When the state of the SDK HTTP call errors we record the error. If the error is set, and the call is successful we will emit a POST_ERROR_SUCCESS event that will allow subscribers to clear out stale errors.