News Score: Score the News, Sort the News, Rewrite the Headlines

Error handling in Go web apps shouldn't be so awkward

In this post I’m going to describe an error-handling pattern I’ve found to be fairly elegant when writing REST, gRPC, or other services in Go. I have two goals in writing this post: To explain the pattern I’ve implemented for a few clients, so that others developing on the same codebase will understand it. To give others a pattern they may wish to implement in their own applications. For simplicty, the examples I’ll be discussing will be part of a REST API, using simple HTTP status codes. But t...

Read more at boldlygo.tech

© News Score  score the news, sort the news, rewrite the headlines