title: Can't return props from getInitialProps when in custom error page
body: <p>I have implemented a custom error page for my Next.js application by creating a custom <code>_error.js</code> file in my Pages folder, as explained in the docs. The problem is that any prop I return from <code>getInitialProps</code> turns out to be undefined. </p>
  
  <p>So I tried keeping my custom <code>_error.js</code> page and putting the sample code in the docs: </p>
  
  <pre><code>import React from 'react'
  
  class Error extends React.Component {
    static getInitialProps({ res, err }) {
      const statusCode = res ? res.statusCode : err ? err.statusCode : null
      return { statusCode }
    }
  
    render() {
      return (
        &lt;p&gt;
          {this.props.statusCode
            ? `An error ${this.props.statusCode} occurred on server`
            : 'An error occurred on client'}
        &lt;/p&gt;
      )
    }
  }
  
  export default Error
  </code></pre>
  
  <p>Still no luck: <code>this.props.statusCode</code> logs as undefined.</p>
  
  <p>The problem is I don't know where to look to debug the issue. In any other page in which I use <code>getInitialProps</code> it works just fine. What could be causing this behavior?</p>