Failure
A failure is an unsuccessful outcome or condition in which an operation, process, or system does not achieve an expected result.
Go in Practice, Second Edition
An error is a condition indicating that an operation failed or produced a result outside expected behavior while the program may still be able to continue.
- How it is used
- Handles unsuccessful operations through explicit return values so callers can respond or pass failures upward.
- How deep it goes
- Works through return conventions, nil checks, custom error types, panic boundaries, recovery, and HTTP responses.
- Examples
- Uses string concatenation, parser locations, division by zero, and HTTP error responses to show different failure paths.
- What you can do after
- Build it from scratch: return and check Go errors, add structured details when useful, and distinguish recoverable failures from panics.
The Art of Code
Failure is a program outcome in which an operation cannot complete its intended contract or produces an unsuccessful result.
- How it is used
- Frames explicit failure paths as part of robust, readable application design rather than an afterthought.
- How deep it goes
- Classifies four failure types and gives boundary, logging, translation, recovery, and fail-fast guidance without detailed implementations.
- Examples
- Uses invalid forms, expired discounts, unsupported uploads, duplicate emails, login limits, and infrastructure outages.
- What you can do after
- Apply it to classify failures and choose validation, controlled responses, diagnosis, recovery, or fail-fast handling.
Learn Go with Pocket-Sized Projects
An error as a value is an explicit value representing an operation failure that code returns and handles directly.
- How it is used
- Makes failed file reads, invalid input, and HTTP timeouts explicit results for callers to handle.
- How deep it goes
- Works through result–error returns, custom sentinels, wrapping, and errors.Is and errors.As checks; does not explore error-interface internals.
- Examples
- Uses a word-corpus reader, decimal parser, HTTP timeout test, and JSON error response.
- What you can do after
- Build it from scratch with explicit result–error returns, recognizable sentinels, and checks for specific failures.
Read how Learn Go with Pocket-Sized Projects explains failure →
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
Error is the discrepancy between a model's actual output and the expected output for an input.
- How it is used
- Uses output error to guide backpropagation and adjust neural-network weights.
- How deep it goes
- Explains error propagation, deltas, and weight updates, but stops short of deriving formulas with calculus.
- Examples
- Uses output-neuron deltas, hidden-layer deltas, and layer-wide weight updates as worked visual examples.
- What you can do after
- Apply it via backpropagation to distribute output errors and update network weights.
Data Pipelines with Apache Airflow, Second Edition
An error is a failure condition or abnormal event reported during system operation.
- How it is used
- Identifies unsuccessful Airflow tasks and system errors so operators can locate, recover from, and monitor pipeline problems.
- How deep it goes
- Walks through failure states, log inspection, retries, and targeted reruns; gives monitoring examples without specifying alert thresholds.
- Examples
- Uses a failed image download, its ConnectionError stack trace, and Airflow graph and grid views.
- What you can do after
- Diagnose/debug with it by finding a failed task, reading its logs, fixing the cause, and clearing affected tasks for rerun.
Read how Data Pipelines with Apache Airflow, Second Edition explains failure →
Modern C, Third Edition
An error condition is a detected circumstance indicating that an operation cannot proceed normally or has not produced a valid result.
- How it is used
- Guides C programs in preventing invalid operations, checking results, preserving error state, and performing graceful cleanup.
- How deep it goes
- Develops precondition checks, return-value conventions, errno preservation, cleanup paths, and limits of recovery; defers detailed signal and threading treatment.
- Examples
- Uses puts with EOF, perror and exit, plus fprintnumbers with invalid arguments, overflow, allocation failure, errno restoration, and output errors.
- What you can do after
- Diagnose and handle C failures by checking documented results, inspecting errno, selecting recovery paths, and centralizing cleanup.
100 Go Mistakes and How to Avoid Them
An error value is a value representing an error condition that can be compared, returned, or propagated by a Go program.
- How it is used
- Represents failure conditions as returned values that callers handle, compare, log, wrap, or propagate.
- How deep it goes
- Explains ordinary returns, sentinel values, error types, wrapping, comparison, and deferred cleanup, but not package internals.
- Examples
- Uses sql.ErrNoRows, io.EOF, database row cleanup, and deferred Close errors to expose comparison and handling choices.
- What you can do after
- Diagnose error-handling mistakes and choose whether to compare, wrap, log, return, propagate, or explicitly ignore failures.
Read how 100 Go Mistakes and How to Avoid Them explains failure →
Distributed Machine Learning Patterns
An event in which a component, operation, or workflow step does not complete as intended.
- How it is used
- Handles machine-learning workflow failures to preserve useful work and reduce negative effects on users.
- How deep it goes
- Distinguishes temporary from permanent failures and gives diagnostic recovery steps, but does not specify an implementation framework.
- Examples
- Uses lost database connectivity, preempted workers, memory exhaustion, missing in-memory data, and competing model-training branches.
- What you can do after
- Diagnose/debug with runtime metadata, classify failure causes, and choose between retrying a step or restarting dependencies.
Read how Distributed Machine Learning Patterns explains failure →
Go in Action, Second Edition
An error is a value or condition indicating that an operation failed or cannot produce its intended result.
- How it is used
- Uses failures to make resilient Go programs handle unexpected conditions through explicit return values and control flow.
- How deep it goes
- Explains error values, interfaces, propagation, wrapping, custom types, inspection, logging, and panic boundaries.
- Examples
- Demonstrates ignored errors, key/value lookups, bulk retrieval, missing-key aggregation, logging, and wrapped unexpected failures.
- What you can do after
- Diagnose/debug with it by checking, logging, propagating, wrapping, and type-inspecting failures in Go code.
Functional Design and Architecture: Examples in Haskell
An error is a condition in software or its environment indicating that a computation or requested operation cannot produce the intended result.
- How it is used
- Frames failure handling as an engineering concern involving errors, exceptions, dependency boundaries, and architectural error domains.
- How deep it goes
- Distinguishes errors from exceptions and prescribes domain separation with boundary conversion, without specifying one universally preferred implementation.
- Examples
- Uses Haskell’s exception mechanisms, Rust’s lack of exceptions, native errors, and architectural error-domain boundaries as concrete illustrations.
- What you can do after
- Evaluate/understand whether a failure is an error or exception and place its representation and handling at an appropriate domain boundary.
Read how Functional Design and Architecture: Examples in Haskell explains failure →
The Art of AI Product Development
An AI mistake is an incorrect, misleading, unsupported, or otherwise undesirable output or behavior produced by an AI system.
- How it is used
- Uses failure classification and transparent communication to manage AI products and build stakeholder trust.
- How deep it goes
- Defines four failure types and gives forecasting examples, but stops short of technical diagnosis or model-level remediation.
- Examples
- Uses inventory forecasts, flash sales, post-holiday demand, uncertain forecasts, and regional growth to illustrate mistakes.
- What you can do after
- Diagnose with failure categories, review forecasts manually, supply contextual inputs, and intervene when outputs are uncertain.
Read how The Art of AI Product Development explains failure →
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
An error is an abnormal condition or event that causes software to produce incorrect behavior or prevents it from completing an operation.
- How it is used
- Uses failure handling to protect users and business operations when microservices encounter expected or unexpected errors.
- How deep it goes
- Defines failure sources and outlines retry, notification, abort-and-restart, and resume strategies without detailing every implementation path.
- Examples
- Uses runtime exceptions, faulty sensor or human input, RabbitMQ failure, Azure Storage failure, and uncaught-exception handlers.
- What you can do after
- Diagnose/debug with logs and choose recovery actions for anticipated and unexpected microservice failures.
Related concepts
- exceptioncontrasts with · An exception is a runtime signal or object representing an abnormal condition that interrupts ordinary program flow and may be handled or propagated.
- paniccontrasts with · A panic is a runtime failure mechanism that abruptly stops ordinary execution when an unrecoverable error or violated assumption prevents safe continuation.
- 500 Internal Server Erroraddressed by · 500 Internal Server Error is an HTTP status code indicating that the server encountered an unexpected condition that prevented it from fulfilling a request.
- error typeimplemented by · An error type is a data type whose values represent failure conditions and may carry information or behavior for reporting and handling those failures.
- context Err methodproduced by · Context.Err is a Go method that returns the error explaining a context’s cancellation or deadline expiration, or nil while the context remains active.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.











