Hi everyone,
I have a langgraph agent deployed in production, and my TypeScript client needs to know whenever something goes wrong (e.g., HTTP error, API error, tool error).
The idea is to show a toast notification in the UI and also keep developers informed in a clean, structured way.
Up until now, my approach has been very simple: I keep a state variable like errorMessage, and whenever an exception happens I append the error text there. It works, but it feels a bit hacky and doesn’t scale well.