Remove undefined variable on error handling.

Not sure if this would be the best way to handle the error response. For now it doesn't throw a notice of the $data variable undefined, and returns the $status code of the last error on the response (didn't find a place where there's more than one error). I found it going to **/users/1/posts** endpoint