Looks like i had an issue last time when i added logic to support case when more than one HttpError is returned. If controller\action doesn't have ReturnResource then for just one HttpError it will work fine and will return that error. But for the list of httpErrors it will try to use ReturnResource. It works fine as deeper it still will use ErrorSerializer, but there is one case that doesn't work.
We have base controller that has some custom attributes, and all controllers inherit it. So base one doesn't have any ReturnResource attributes. But we have some some generic handling there and we can return more than one HttpError there and without that change it just throws an error that ReturnResource is missing
I added logic to check for both HttpError and IEnumerable and also added unit test to cover that scenario.
Hi Jouke,
Looks like i had an issue last time when i added logic to support case when more than one HttpError is returned. If controller\action doesn't have ReturnResource then for just one HttpError it will work fine and will return that error. But for the list of httpErrors it will try to use ReturnResource. It works fine as deeper it still will use ErrorSerializer, but there is one case that doesn't work.
We have base controller that has some custom attributes, and all controllers inherit it. So base one doesn't have any ReturnResource attributes. But we have some some generic handling there and we can return more than one HttpError there and without that change it just throws an error that ReturnResource is missing
I added logic to check for both HttpError and IEnumerable and also added unit test to cover that scenario.
Thanks