502 Bad Gateway with Mashape Imgur API upload
<p>I have a previously working implementation of client-side image uploads.  Code is below.  Currently I'm running into the following: </p>

<pre><code>https://imgur-apiv3.p.mashape.com/3/image.json Failed to load resource: the server responded with a status of 502 (Bad Gateway)
</code></pre>

<p>Do you know what might be causing this? </p>

<pre><code>xhr.setRequestHeader('X-Mashape-Key', 'KEY');
    //xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xhr.setRequestHeader('Authorization', 'Client-ID ID');

    xhr.onload = function (data) {
        var response = JSON.parse(xhr.responseText);
        if (response &amp;&amp; response.data &amp;&amp; response.data.link) {
            response = response.data.link.replace(/^http:\/\//i, 'https://');
            var img = new Image();
            img.src = response;
            // check dimensions - 2000 x 400 ideal
            img.onload = function () {

                successCallback(response);

            };
        } else {
            if (failCallback) {
                failCallback();
            }

        }
        imageService.loadComplete();
    };

    xhr.send(fd);
</code></pre>