Beginner · 25 min · 4 steps

Cleaning broken webhook messages so the order worker does not crash

Arjun Nair, Senior Ingestion Engineer at RetailSwift

It is Monday, 8:14 AM. Arjun Nair has just reached the RetailSwift office in Bengaluru. Before he can even put his coffee down, his screen fills with red alerts in the #ops-firewatch channel. Over 45,000 checkout messages (webhooks) are stuck in the queue and are not reaching the order database.

The question

How do we read and clean messy JSON messages from the app, without crashing the program that saves orders?

  • JSON parsing
  • Type casting
  • Dictionary validation
  • Custom exceptions

The rest of this case study is locked

The data, every step with its code and result, and the final answer open with a pass. A few case studies stay free so you can see how they work.