For converting my internal errors to something for the API, which of those options is what I should be using in Go? (Or am I doing this completely incorrectly and there is a better option)
@mitsuhiko Option 2 (idiomatic error check); the std/low-level way is to use https://pkg.go.dev/net/http#Error, don’t know about the router/framework used where web.ExposeError is available.
@mitsuhiko Option 2 is what I would expect reading Go code. Option 1 would (no matter how often I’ve seen this pattern in other languages) take some mental capacity to parse.