But if it returns null, wouldn’t dto.GetType() also fail? Say you fetch person id=5 and it doesn’t exist, a return null is easily adapted in angular. You would prefer instead to return http error code?
Not sure where the IResponse.End() would go. It can’t go in the filter itself because the exception is thrown higher up in ExecTypedFilters. Would it be that “wrong” to bound-check in the Exec part? Or do you mean adding End() in the method that would normally return void?
I must be missing something … but the AppHost (and parent classes) do not define an OnAfterExecute. The service runner does; however, the signature of the service runner OnAfterExecute does not include the DTO.