title: Angular observable throws error with status code 200 when trying to get multiple images
body: <h2>Problem description</h2>
  <p>I'm a having problems with getting multiple images from a postgreSQL database and showing it on my frontend. The images are stored in postgreSQL as binary data. If I run my express code I get the image data as buffer back in json format.
  When I run the code I receive a 200 status code, but the observable ends up executing the handleError function.
  Here you can see my console --&gt; <a href="https://i.stack.imgur.com/8BW5A.png" rel="nofollow noreferrer">console</a></p>
  <h2>My goal</h2>
  <p>I want to get multiple images from a house to show on my frontend modal page, those images are stored in a separate table in the database. With this query <code>(&quot;select * from housee.houses_images where straatnaam = $1 AND straatnr = $2 AND postcode = $3&quot;,) </code> in my postgreSQL database I can get the right images. After I get all the images I want to display them in a ion-img tag (from the ionic framework)</p>
  <h2>Code information</h2>
  <p>So I am using a <strong>postgresSQL</strong> database with a backend in javascript using the <strong>express.js</strong> library and a frontend in <strong>Angular</strong>.</p>
  <p>This is my table in postgreSQL--&gt; <a href="https://i.stack.imgur.com/l49Jw.png" rel="nofollow noreferrer">table postgreSQL</a></p>
  <p>In my <strong>backend index.js</strong> file I have this code</p>
  <pre><code> app.get(
    &quot;/getMarkerPhotos/:straatnaam/:straatnr/:postcode&quot;,
    function (req, res) {
      client.query(
        &quot;select * from housee.houses_images where straatnaam = $1 AND straatnr = $2 AND postcode = $3&quot;,
        [req.params.straatnaam, req.params.straatnr, req.params.postcode],
        function (err, data) {
          if (err != null) {
            res.sendStatus(500);
          } else {
            res.sendStatus(200);
          }
        }
      );
    }
  );
  </code></pre>
  <p>The call in the backend is working because if I run it in postman it gives back my data in JSON format --&gt; <a href="https://i.stack.imgur.com/5Lco0.png" rel="nofollow noreferrer">postman</a></p>
  <p>On to the frontend, in my <strong>api.service.ts</strong> file I made this function</p>
  <pre><code>getMarkerPhotos(straatnaam: any, straatnr: any, postcode: any): Observable&lt;any&gt; {
      var result = this.http.get(this.url + '/getMarkerPhotos/' + straatnaam + '/' + straatnr + '/' + postcode)
      .pipe(
        catchError(this.handleError)
     );
      console.log(result)
      return result
    }
  
  &lt;--other code--&gt;
  
  private handleError(error: HttpErrorResponse) {
      if (error.error instanceof ErrorEvent) {
        console.log(error.error.message)
  
      } else {
        console.log(error.status)
      }
      return throwError(
        console.log('Something is wrong!'));
    };
  </code></pre>
  <p>Than on my modal page (<strong>maker-modal.components.ts</strong>) where I want to show the images from the database I have this code</p>
  <pre><code>ngOnInit() {
      this.getMarkerPhotos();
    }
  
    getMarkerPhotos() {
      this.api.getMarkerPhotos(this.straatnaam, this.straatnr, this.postcode).subscribe(
  
        data =&gt; {
          console.log(data)
          //this.photos.push(data)
          //console.log(this.photos)
        },
        error =&gt; {
          console.log(&quot;Subscribe error: &quot; + error)
        }
      );
    }
  </code></pre>
  <p>I hope someone can help me with this.
  Thanks in advance!</p>