I have a rest api with .net5, which has a global exception filter, and returns an ErrorMessage object in case of exceptions. I call the api from a WinForms .net framework 4.