'object' does not contain a definition for 'errors'

I basically had the requirement to return a Json object with a predefined structure (for our ASP.net WebApi endpoints) in case of exceptions resulting out of failed entity validations. So I started to write a unit test in my Api.UnitTests.csproj project which had a reference to Api.csproj where the actual implementation of the exception filter was. Here’s the skeleton of the exception filter: