Error message with a success http code

jerryt
Tera Contributor

I found that the REST API sometimes   returns an error message with a success code(201 created) when failed to insert data using import set API. I'm wondering if there're any other cases that the API returns an error message with a success code(200 or 201)?   And what is the error message structure?

Here's an example:

Status code201 Created

{

  "import_set": "ISET0010003",

  "staging_table": "imp_computer",

  "result": [

      {

          "transform_map": "Computer",

          "status": "error",

          "error_message": "Unable to resolve target record, coalesce values not present: serial_number; Invalid table ",

          "status_message": "Unable to resolve target record, coalesce values not present: serial_number"

      }

  ]

}

4 REPLIES 4

Chuck Tomasi
Tera Patron

Hi Jerry,



How many records were imported in to the record? It looks like it tried to do the transform and got hung up. Just curious if records were created and how many.


Hi Chuck,


Records were not created. I see this error when inserting data without giving a value of serial_number, it seems that serial_number field is a must if you want to insert data into imp_computer.


If serial_number is given, then a record will be successfully inserted.


Is there a data policy? I've never heard of that on an import set table. Target table, sure. That's a feature of the transform map.


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee