It worked for three months, then a string became an array.
First time I built an automated construction code referencing integration, it worked perfectly for 3 months, then it broke, item not found in the lookup table.
It went like this:
An operator opens a ticket and selects an item from a list -> the system looks up that item in a table and pulls building code references from the same row -> and writes them back to the ticket.
Super simple workflow that saves hours of manual referencing.
I look into the error and see that the item selected is in the table, no extra spaces, no spelling mistakes, same data type (string).
I trace the flow of that piece of data in every step manually (this was pre-AI) and, here we go, the lookup table input is my string but wrapped in an array, different data type! Why? It's a string at the beginning and a string at the end, why does it change to an array in the middle?!
Well, it turns out, somebody changed the list type from single choice to multi choice and those strings are held as array in the backend.
Don't trust your inputs, validate at the boundary, because the schema you integrated against was a promise that nobody upstream knew they made.