Table API Doesn't Throw Errors for Invalid Field Names or References

mshnitzer
Tera Contributor

When using the Table API to create or update a table row there is no error returned when trying to set/update a field that either doesn't exist, or contains an invalid value.

 

I would expect the following scenarios to return an error, but currently return http status code 200 or 201 (both OK).

 

Create or Update Record with the following options

  • Specified field does not exist.
  • Setting a choice field to a value that is not a choice.
  • Setting a reference field to a value that does not map to the referenced table.

 

For example, creating a record with the following POST body "{u_fake_field:fake_value}" returns a 201 OK and I have no way of knowing there was a problem creating the field without comparing the expected and actual field names and values.

 

Is there a setting or parameter I am missing that would have the TABLE API return an error?  I was only able to find a way to set fields to required, but there are many different calls to this specific table so the fields are not always required.

 

Thank You and I appreciate any help.

 

Michael Shnitzer

2 REPLIES 2

haninger_3
Tera Guru

I wish I had more to add here, but I don't. You've exactly described the issue I'm researching.

 

We have an external system doing REST calls to update reference fields with display values. When the reference is completed, all is fine - the reference field looks good on the form, workflows run, etc. When the reference ISN'T completed, the little (i) icon appears as though the reference WAS completed, but the field looks empty. If I query the actual value in the field with a background script, it is populated with the display value of a missing record.

Idriss GAETAN
Tera Contributor

Hello,

For my part what I have done to overcome that it's to write a business rule for each fields I want to check the value

if the value comes with the correct answer we will do the update if not we will abord the action and then will return an error to he OOTB API.

Best regards,

Idriss