API enrichment response/error handling question


#1

I’ve implemented a custom api enrichment where some of the api calls return no usable data to be stored as a result of the enrichment. With the current implementation, this still results in a record written to the enrichment-specific table in Redshift even though all custom fields are null. Ideally, there would be no additional derived context, and therefore no record written to the database. According to the api enrichment documentation, “if output’s JSONPath wasn’t found - event will be sent to enriched/bad bucket”. Is there some way to indicate that if the output is missing (or perhaps a 404 is returned), that no new context gets derived, but the event will be processed as usual?


#2

Hi @jwhansome - thanks for flagging. I think your suggested alternative behavior makes a lot of sense - perhaps in hindsight it should have even been the default.

@anton what are your thoughts on this one?


#3

I like this idea. Created corresponding ticket to investigate options: https://github.com/snowplow/snowplow/issues/3485. Right now unfortunately, I don’t think it’s possible to skip these.


#4

I like the proposed solutions. Thanks for considering it.