Inconsistent error reporting from batch create campaign call


#1

When posting a request that has multiple errors in the campaigns passed up, I’m not seeing all the errors I expect. I was expecting two operation errors in the response to the request below, as the first campaign has an end date before the start date provided in addition to the funding instrument ID being invalid for the 3rd campaign.

Is there a list of validation errors that are expected?

Request:

[
  {
    "operation_type": "Create",
    "params": {
      "name": "bulk_ckm1",
      "funding_instrument_id": "<a valid id blanked out here>",
      "start_time": "2016-04-25T08:00:00Z",
      "end_time": "2014-04-26T08:00:00Z",
      "daily_budget_amount_local_micro": 100000000
    }
  },
  {
    "operation_type": "Create",
    "params": {
      "name": "bulk_ckm2",
      "funding_instrument_id": "<a valid id blanked out here>",
      "start_time": "2016-04-25T08:00:00Z",
      "end_time": "2016-04-26T08:00:00Z",
      "paused": true,
      "daily_budget_amount_local_micro": 100000000
    }
  },
  {
    "operation_type": "Create",
    "params": {
      "name": "bulk_ckm3",
      "start_time" : "2016-04-25T08:00:00Z",
      "funding_instrument_id": "whoops",
      "end_time" : "2016-04-26T08:00:00Z",
      "daily_budget_amount_local_micro": 100000000
    }
  }
]

Response:

{
  "request" :
  [
    {
      "params" :
      {
        "name" : "bulk_ckm1",
        "start_time" : "2016-04-25T08:00:00Z",
        "daily_budget_amount_local_micro" : 100000,
        "end_time" : "2014-04-26T08:00:00Z",
        "funding_instrument_id" : "<a valid id blanked out here>",
        "account_id" : "okrly1"
  },
  "operation_type" : "Create"
},
{
  "params" :
  {
    "name" : "bulk_ckm2",
    "start_time" : "2016-04-25T08:00:00Z",
    "daily_budget_amount_local_micro" : 100000,
    "end_time" : "2016-04-26T08:00:00Z",
    "funding_instrument_id" : "<a valid id blanked out here>",
    "account_id" : "okrly1"
  },
  "operation_type" : "Create"
},
{
  "params" :
  {
    "name" : "bulk_ckm3",
    "start_time" : "2016-04-25T08:00:00Z",
    "daily_budget_amount_local_micro" : 100000,
    "end_time" : "2016-04-26T08:00:00Z",
    "funding_instrument_id" : "whoops",
    "account_id" : "okrly1"
      },
      "operation_type" : "Create"
    }
  ],
  "operation_errors" :
  [
    [
    ],
    [
    ],
    [
      {
        "code" : "NOT_FOUND",
        "message" : "funding instrument whoops was not found for account okrly1"
      }
    ]
  ]
}

#2

Thanks for reporting that. The expected behavior is that all errors would be returned, and it does seem like there is a bug where not all errors are being returned in the response.

However, I did check and confirm that if the first reported error(s) is resolved and the the corrected request is passed in, we would in fact detect any additional errors, so this bug should not prevent you from creating valid campaigns.

We’ll let you know with updates/any fixes to this bug in this thread.


#3

perfect! Thanks.