4 ms·
It's not a good practice to print stack trace anyway, you have a network timeout, you don't need 20 lines of stacktraces. Most logger in Go can it though.
by Thaxll 3y ago
It's not a good practice to print stack trace anyway, you have a network timeout, you don't need 20 lines of stacktraces.
Most logger in Go can it though.
- hamandcheese 3y agoHow do you identify which network call is the one that timed out?
- zer00eyz 3y agoYour errors have messages, most of the time your "did not connect" error gets caught inside your "DiscountService" And returns a "could not connect to discount service error" ... Its funny that were having this conversation because "discount service" is a thing in my life. Its sporadic failures means I just re-try immediately and get a success... Errors are part of flow control.
- Thaxll 3y agoYou wrap errors with fmt.Errorf(). I work on Go daily and I don't need a stacktrace to tell me where the problem is, the error is self explanatory.
- pgwhalen 3y ago> It's not a good practice to print stack trace anyway What makes it not a good practice? > you don't need 20 lines of stacktraces I don't _need_ stacktraces, but they are useful to me.