     }
     
     public func update(with data: Data) throws {
+        if throwsOnUpdate {
+            struct Error: Swift.Error {}
+            throw Error()
+        }
     }
 }
 

private class FakeRequestParser: RequestParser {
    public var json: Any =  [:]
    public var requestType = RequestType.launch

    func parseSession() -> Session? {
        return Session(isNew: false, sessionId: "", application: Application(applicationId: ""), attributes: [:], user: User(userId: ""))

    }
    
    func testDispatchAsyncErrorParsingRequest() {
        requestParser.throwsOnUpdate = true
        let testExpectation = expectation(description: #function)
        requestDispatcher.dispatch(data: Data()) { response in
            switch response {
