Targeting criteria batch endpoint no longer returning correct operation_errors


#1

When sending a request I expect an error from, the operation_errors do not match up to the operations in the request e.g:

[ { params: 
     { line_item_id: 'dys09',
       targeting_type: 'AGE',
       targeting_value: 'AGE_OVER_13',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys09',
       targeting_type: 'LOCATION',
       targeting_value: '2509b9adc1fedfd2',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys07',
       targeting_type: 'AGE',
       targeting_value: 'AGE_13_TO_19',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys07',
       targeting_type: 'LOCATION',
       targeting_value: '2509b9adc1fedfd2',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys0a',
       targeting_type: 'AGE',
       targeting_value: 'AGE_OVER_13',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys0a',
       targeting_type: 'LOCATION',
       targeting_value: 'a56612250c754f23',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys08',
       targeting_type: 'AGE',
       targeting_value: 'AGE_13_TO_19',
       account_id: '18ce54auygc' },
    operation_type: 'Create' },
  { params: 
     { line_item_id: 'dys08',
       targeting_type: 'LOCATION',
       targeting_value: 'a56612250c754f23',
       account_id: '18ce54auygc' },
    operation_type: 'Create' } ]

results in operation_errors:

[ [ { code: 'INVALID',
      message: 'These age bucket targeting criteria ([AGE_13_TO_19]) can only be used when your location targeting criteria are within Japan. Try changing your AGE_BUCKET criteria.',
      attribute: 'targeting_type' } ],
  [ { code: 'INVALID',
      message: 'These age bucket targeting criteria ([AGE_13_TO_19]) can only be used when your location targeting criteria are within Japan. Try changing your GEO criteria.',
      attribute: 'targeting_type' } ] ]

Previously errors in the batch operations would result in empty arrays for operations that had no errors and the order would be maintained so I could tie errors back to specific operations e.g,:

[ 
[],
[],
[],
[],
[ { code: 'INVALID',
      message: 'These age bucket targeting criteria ([AGE_13_TO_19]) can only be used when your location targeting criteria are within Japan. Try changing your AGE_BUCKET criteria.',
      attribute: 'targeting_type' } ],
  [ { code: 'INVALID',
      message: 'These age bucket targeting criteria ([AGE_13_TO_19]) can only be used when your location targeting criteria are within Japan. Try changing your GEO criteria.',
      attribute: 'targeting_type' } ] ]

Is there a way for me to tie errors back to specific operations from a request?


#3

Thanks for reaching out, @thall_trevor. We will look into this. We’ll update once we know more.