Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question BadRequest (21400)

Discussion in 'Matchmaker' started by dr_profesor33, Apr 28, 2023.

  1. dr_profesor33

    dr_profesor33

    Joined:
    Sep 30, 2017
    Posts:
    4
    Hey, I'm trying to use the matchmaker, but when I create a backfill ticket I get this response:


    [Matchmaker]: BadRequest (21400)
    Title: Bad Request
    Errors:
    {"source":["Value cannot be null. (Parameter 'source')"]}


    I've tried looking around but cannot find the "source" parameter that it is referring to.

    The code creating the ticket looks like this:
    Code (CSharp):
    1.             BackfillTicketId = await MatchmakerService.Instance.CreateBackfillTicketAsync(new ()
    2.             {
    3.                 Connection = $"{transport.ConnectionData.Address}:{transport.ConnectionData.Port}",
    4.                 Properties = new BackfillTicketProperties(new MatchProperties(players: currentPlayers)),
    5.                 QueueName = payload.QueueName,
    6.                 MatchId = payload.MatchId,
    7.                 PoolId = payload.PoolId,
    8.             });
    Any help getting this resolved would be great!
     
  2. dr_profesor33

    dr_profesor33

    Joined:
    Sep 30, 2017
    Posts:
    4
    Turns out removing the MatchId and PoolId makes it work :confused: