Go defer, panic, and recover Tutorial
Learn how Go's defer, panic, and recover work together, when to use each, and how to write resilient code without abusing exceptions.
7 posts · page 1 of 1
Learn how Go's defer, panic, and recover work together, when to use each, and how to write resilient code without abusing exceptions.
Idiomatic error handling in Go: sentinel values, wrapping with %w, errors.Is and As, custom types, and the structural patterns that keep code readable.
Compare the errors array, union result types, and partial responses to design predictable, typed error handling for your GraphQL APIs and clients.
Design clear, consistent error responses for REST APIs using HTTP status codes, problem details, and error envelopes that clients can actually handle.
How Rust's From trait powers the question-mark operator and lets you compose error types cleanly across libraries, applications, and async code.
How idiomatic Rust handles errors with Result and the ? operator: propagation, conversion, custom error types, and when to use anyhow or thiserror.
A practical guide to Go error handling: the error interface, sentinel values, custom types, wrapping with fmt.Errorf %w, and errors.Is and errors.As.