Better handling of unsuccessful responses and tests