Adding basic handling of a failed ajax query, mainly for people with servers that interfere with the json output