add fix to couchbase class to try to return json or text in case of error