I have created an API that is returning an object A, containing object B and object B is containing object A, see example below:
public class Person() {
string Name {get;set;}
List<Schema> Schemas {get;set;}
}
public class Schema(){
List<Person> Persons {get;set;}
}
In C# this will not be a problem, and an exception will not be catched (I've added try-catch-statements everywhere.
Problem: When I tried out the function using swagger the exception thrown to the client is 500.
The client calling the API is telling me that the it's a cors policy validation. This I know for sure that this is not the problem since it works well in other scenarios.