[core] Fixes issue with handling exceptions in after filter