title: I am getting ERROR TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) error
body: <p>I am using angular 8 at front end and java spring boot at back end while running the application I am getting this error. I am new to angular and I guess the error is because of response body from back end but I couldn't solve it.</p>
  
  <p>I have tried the other answers but nothing seems to work.</p>
  
  <p>auth.service.ts </p>
  
  <pre><code>// Method from server should return QueryResultsModel(items: any[], totalsCount: number)
      // items =&gt; filtered/sorted result
      findUsers(queryParams: QueryParamsModel): Observable&lt;QueryResultsModel&gt; {
          const httpHeaders = new HttpHeaders();
          httpHeaders.set('Content-Type', 'application/json');
          return this.http.post&lt;QueryResultsModel&gt;(API_USERS_URL + '/use' + '/findUsers', queryParams, { headers: httpHeaders});
      }
  </code></pre>
  
  <p>Web service java spring boot</p>
  
  <pre><code>// Get All User
  @PostMapping(value = "/user/use/findUsers")
  public ResponseEntity&lt;List&lt;User&gt;&gt; getAllUserFind() {
      try {
          return new ResponseEntity&lt;&gt;((List&lt;User&gt;)userService.getAllUser(), HttpStatus.OK);
      } catch (Exception e) {
          return new ResponseEntity&lt;&gt;(null, HttpStatus.INTERNAL_SERVER_ERROR);
      }
  }
  </code></pre>