3 ms·
Moving from Twitter over to here now: I've had to work through several issues like this in my career. I think there are really a few options, but none of them
by adamlarson23 4y ago
Moving from Twitter over to here now:
I've had to work through several issues like this in my career. I think there are really a few options, but none of them are great.
1. Depending on the error, what data is missing, can you fill in defaults? If its possible to handle this error in a way that doesn't compound into the application crashing, then that would be the best. The fact you have postHogId, means to me that most likely its a critical field that can't be missing, if thats the case then this option won't work.
2. The problem with showing the user the error, is that they can't do anything about it really. But that is an option, let the user know a critical error has occurred and have them restart (again depends on the context). If you can't minimize the blast radius this is the only option IMO. Its so costly when issues compound and cause issues well into the future, and it takes forever to really track down what caused it.
3. What I would do personally is have to understand the real context of where this would occur. I've found that most errors can be handled and hidden from the user, but there are times like you said where someone changed database schema that no matter what you do its not gonna work. It would depend on what depends on the success of this call for example, if this is only one portion of functionality vs a very dependent piece of functionality.
Tough situation though, and really there is no right choice, its looking at probability of occurrence, and making decisions based on cost, maintenance, impact to users etc.