improve capture of response errors