title: react-native: axios get 500 internal server error
body: <p>The code should return list of album objects in the console, but is not returning it and instead getting a 500 internal server error.</p>
  
  <p>Error : <a href="https://i.stack.imgur.com/l29Ho.png" rel="nofollow noreferrer">enter image description here</a> </p>
  
  <pre><code>import React, { Component } from 'react';
  import { Text, View } from 'react-native';
  import axios from 'axios';
  
  class AlbumList extends Component {
  
    componentWillMount() {
        axios.get('https://rallycoding.herokuapp.com/api/music_albums')
          .then(function(response){
            console.log(response);
          })
    }
  
    render(){
      return(
        &lt;View&gt;
          &lt;Text&gt; Albums ! &lt;/Text&gt;
        &lt;/View&gt;
      );
    }
  }
  
  export default AlbumList;
  </code></pre>