Backend
Error Handling
Go error wrapping and handling patterns for microservices. Covers AppError struct (Code, Message, HTTPStatus, cause), constructor functions (NewNotFound, NewBadRequest, NewInternal, NewUnauthorized, NewConflict), error wrapping with fmt.Errorf %w, sentinel errors with errors.Is/errors.As, error-to-HTTP status mapping middleware, error catalog pattern, and error logging rules. Keywords: error, AppError, wrapping, sentinel, HTTP status, catalog, errors.Is, errors.As, middleware, logging.