Your server sent one order ID. The browser showed another.
transcript
Your server sends an order ID. The browser reads a different one. No error. No warning. Just the wrong order.
The server sends order 240044212224069649. As a JSON number. The browser parses it as a JavaScript number. And quietly rounds it. A different ID. Nothing throws.
The ID is 64 bits. Time, worker and sequence, packed together. JavaScript numbers stay exact only to 2 to the 53, minus 1. A Snowflake ID passes that within weeks of its epoch. After that, IDs get rounded.
Here's what makes it nasty. Precision loss doesn't throw an error. It just silently changes the ID. There's nothing to catch.
As a number, it's rounded past 2 to the 53. The wrong order, silently. The fix? Send the ID as a string, in quotes. The browser keeps it exactly.
So every 64-bit ID leaves your API as a string. Big IDs travel in quotes. Or they arrive changed.
Full breakdown in the lecture.