News for hackers. Stuff that matters.
Re:How We Centralized and Structured Error Handling in Golang by lmm on Wednesday December 18, 2024 @01:40AM (#42448552)
Yeah, that's usually the pragmatic thing to do. Facebook does that with their API, for example.

4xx or 5xx gets you the default HTTP handling for that kind of error. Occasionally - especially in small examples - that default handling does what you want and saves you duplicating a lot of work. More often it gets in your way.

I'd compare it to browser default styling - in small examples it sounds useful, but in a decent-sized site you just end up having to do a "CSS reset" to get it out of the way before you do your styling.

There are no comments on this comment yet.