filter: Set correct error status and return correct value