title: How properly filterSuccessfulStatusCodes in RxMoya
body: <p>Im using RxMoya and I was wondering about usage of fiterSuccesfulStatusCodes, I will try to describe what my problem is...So when you use some Network call like this</p>
  
  <pre><code>func getAllApps(gwId: Int) -&gt; Observable&lt;Response&gt; {
      return provider.request(RestAPI.GetAllApps(gwId: gwId)).filterSuccessfulStatusCodes()
  }
  </code></pre>
  
  <p>When you get response with status code above 299 nothing will happen, my problem is that I would like to display error message to user, but when you inspect what does filterSuccessfulStatusCodes do: </p>
  
  <pre><code>public func filterSuccessfulStatusCodes() -&gt; Observable&lt;E&gt; {
      return flatMap { response -&gt; Observable&lt;E&gt; in
          return Observable.just(try response.filterSuccessfulStatusCodes())
      }
  }
  </code></pre>
  
  <p>Now we are getting closer to the problem I have. So implementation of filterSuccessfulStatusCodes uses public instance function of Moya.Resposne with this implementation : </p>
  
  <pre><code>public func filterSuccessfulStatusCodes() throws -&gt; Response {
      return try filterStatusCodes(200...299)
  }
  </code></pre>
  
  <p>As you can see, this thing throws exceptions...but the function above, it doesnt rethrow, it returns Observable of generic type E. </p>
  
  <p>My first question, How come you can use return Observable.just(try response.filterSuccessfulStatusCodes()) when the function doesnt throw/rethrow. You can use try withou do/chatch?(I know with try!/try? you can but with try, I can only imagine case with rethrow).</p>
  
  <p>Second question, it there a way to react to error status codes, on the level of observables.</p>
  
  <p>Thank you</p>