Updated data service to only cache data if the response is not a 500 server side error.