API Exception Handling for custom Objects

Im developing a Python script to import some custom objects and have just run into a non-issue, but rather a question. When creating a duplicate custom Object the HTTP return status is 400, but the same cannot be said when creating a duplicate Contact that scenario returns i believe 409. Just curious if this was by default or if im maybe missing something

Hey, @JUrena :waving_hand: Happy to investigate a bit more for us. To clarify, this is when you are creating a new, but duplicate, record on for your Custom Object? Not creating a new Custom Object itself? Meaning, if I have:

  • a custom object called Cats
  • I have an existing record called Tabby
  • I try to create another record called Tabby
  • I receive a 400 response instead of the expected 409 response

Or something similar? If not, that’s OK too. My goal is to make sure I understand 100% and not guess or assume.

Thanks! — Jaycee

That is precisely the scenario I am encountering, thank you for making sure!

Im trying to use the python lib to make api calls but it seems like this

api_client.crm.objects.basic_api.create

end point doesnt return api exception 409 when there are duplicates like it does for contacts, it just returns 400. How can/should I be handling this scenario?

Merging with your other post to keep things neat :blush: