Start a new topic

collectionAccess.collection("Collection").find returns undefined instead of array

Hello!
Today I noticed the strange error of BL. I do call in my BL like

collectionAccess.collection("Collection").find({"_id":collectionAccess.objectID(entityId)},{},function(err, results){

Usually in results I get an array with data(or empty array if entity with _id doesn't exist), but from time to time it returns me "undefined" in results.

I've created custom "test" endpoint to reproduce the issue and code looks like this: 

function onRequest(request, response, modules) {
	var collectionAccess = modules.collectionAccess;
	var logger = modules.logger;
	var entityId = "myEntityId";
	collectionAccess.collection("Collection").find({"_id":collectionAccess.objectID(entityId)},{},function(err, results){
	  response.body = {"results":results,"error":err};
	  response.complete(200);
	});
}

  
To reproduce this issue in API console I run POST request  /rpc/kid_-k8AUP2hw/custom/test with empty body.

Usual  response is:

{
  "results": [
    {
      "_id": "55421a8c0f2a6a070092ddd8",
      "email": "kpfihxkouid",
      "_acl": {
        "creator": "55421a8c4f6d806874036b96"
      },
      "_kmd": {
        "lmt": "2015-04-30T12:08:26.919Z",
        "ect": "2015-04-30T12:05:32.232Z"
      }
    }
  ],
  "error": null
}


But after about 30th call I get next response and then again get correct responses:

{
  "error": {
    "debugMessage": "Container mapping not found"
  }
}

I didn't found any documentation about this error. The error occurs for all my collections

Please help me


1 Comment

Yegor:


I believe this was a temporary outage related to some upgrades that we were doing last week.   This isn't still affecting you is it?


Thanks,

Login or Signup to post a comment