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

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

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