Hi, I'm Harrison. I currently work at me&u as a software engineer. I enjoy golfing, gaming, travel and playing with my dog Spud.

Aug 22, 2021

Errors At 99

Excellent post on go errors.

Basically the TLDR was:

  • panic if you want Bugsnag
  • Wrap errors in general go code, it should look like this
// in go func
fmt.Errorf("operation failed: %w", err)

// in caller func
errors.Unwrap(err)
  • Use twirp errors if we want the client to do something with the error, here is a list