Sign In Register

How can we help you today?

Start a new topic
Solved

Game data Service queryItems method return service unavailable

Hello everyone,


Right now I am trying to migrate some persistent data code from old mongoldb collections to the new game data service.


I've created a new datatype and I am able to insert data using cloud code.

I can even query data inserted using data explorer but when I am trying do query data using cloud code I am receiving the  and error message.


here the cloud code:


var GDS = Spark.getGameDataService();


var condition = GDS.S("user").eq(userName);

var sort = GDS.sort("letter",true);


var query = GDS.queryItems("LETTERSTATS", condition, sort);


the error message received

  • {
      "@class": ".GameSparksErrorResponse",
      "error": {
        "message": "Query service unavailable (event/AppUser_LetterStats_Get.js#45)"
      },
      "message": "Query service unavailable (event/AppUser_LetterStats_Get.js#45)"
    }

I found myself what was causing the error.

Game data service "condition" and "sort" parameters are case sensitive (You have to type the exactly short code  you've created at datatype index management page).


Hi William,


Glad to hear you got this resolved. If you need anything else just let us know


Regards,

Liam

Login to post a comment