PUBAPI-743: Avoid caching  when response is an error