filters: Adjust callback API for flags/errors