Successful response when erroring while creating a new timeline event


#1

I’m using the API via Postman to create a new timeline event on a contact’s timeline using oauth on:

https://api.hubapi.com/integrations/v1/54063/timeline/event

with the body:

{
“id”: “100010101”,
“eventTypeId”: 18810,
“npsscore”: 10,
“npsfeedback”: “Awesome integration, works smoothly and I can track user’s changes over time without leaving hubspot”,
“email”: "bh@hubspot.com"
}

The response I’m getting back to that request is a 200 response indicating success, but behind the scenes nothing is happening. I’ve tracked back to the api logs and see that the request is actually erroring with 415, but that error code isn’t getting propagated back to me. Setting a content-type header (not documented as required) resolves the error and changes the response to 204 which from other conversations in the forums in the correct response (still not showing in my user’s timeline, but I need to spend some time researching that). Just wanted to call out the 415 errors getting swallowed and replaced with 200 codes