iam try to call a function from Scheduled Task using a segment to delete Master Player Accounts but throws fail Invocation of cloud script function "MasterDeleted" failed.
If i return a string, the function runs fine, but if i try to get the context from the request, i get internal server error.
The same function runs fine when called from the client.
[FunctionName("HelloWorld")]
public static async Task<string> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequestMessage req,
ILogger log)
{
var context = await FunctionContext.Create(req);
var playerId = context.CallerEntityProfile.Lineage.MasterPlayerAccountId;
return await PlayerUtil.HelloWorld(context.AuthenticationContext, playerId);
return "hello" + context.ToString();
}