this blows up because this.res.response.xhr.responseText is the string"ERROR: "page" is out of valid range."
I'm not sure if there are other errors for which the responseText will be a JSON object or not, but we definitely shouldn't always try to parse it. out of range errors are plentiful at this point, with no guard mechanism in place.
Pixabay's out of range error looks like this:
this blows up because
this.res.response.xhr.responseText
is the string"ERROR: "page" is out of valid range."
I'm not sure if there are other errors for which the
responseText
will be a JSON object or not, but we definitely shouldn't always try to parse it. out of range errors are plentiful at this point, with no guard mechanism in place.