                     switch event {
                     case .Next:
                         XCTFail("next called for invalid data")
-                    case .Error(let error):
+                    case .Failed(let error):
                         receivedError = error
                     default:
                         break

                    switch event {
                    case .Next(let object):
                        XCTFail("called on non-correct status code: \(object)")
                    case .Error:
                        errored = true
                    default:
                        break

                    switch event {
                    case .Next(let object):
                        XCTFail("called on non-success status code: \(object)")
                    case .Failed:
                        errored = true
                    default:
                        break
