An error-handling strategy is a systematic approach for detecting, responding to, and recovering from software errors.
An error-handling strategy plans how an application detects failures and recovers with minimal harm to users and the business. Failures can come from runtime exceptions, bad input, unexpected code use, or unavailable dependencies. section 11.2.2
For anticipated errors, choose an appropriate response:
Use exceptions, callbacks, or promises to handle errors; retry the operation, correct the problem and restart it, or report the error to users or operations staff. section 11.2.2
For unexpected errors, choose between aborting and restarting the process or resuming operation. In the abort-and-restart approach, an unhandled exception aborts the process; a handler can log it and exit. section 11.2.2
Figure 11.3 Strategies for handling unexpected errors
Compare the two approaches for handling unexpected errors. section 11.2.2
How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it
How deep it goes
Explains anticipated-error responses and names two unexpected-error strategies, but does not detail the resume approach.
Effective Conversational AIError handling is the management of recognition, interpretation, or execution failures so that a system can recover or guide the user toward an appropriate outcome.
gRPC Microservices in GoError handling is the practice of detecting, representing, and responding to failures during software execution or communication.
LangGraphused by · LangGraph is a framework for building stateful, graph-structured workflows and applications, including those involving language models and agents.
exceptionuses · An exception is a runtime signal or object representing an abnormal condition that interrupts ordinary program flow and may be handled or propagated.
result typeused by · A type that represents an operation’s outcome as either a successful value or a failure value.
try-catch statementuses · A try-catch statement is a control-flow construct that executes code under exception handling and transfers control to a matching handler when an exception is raised.
error codeuses · An error code is a symbolic or numeric value that indicates or identifies an error or failure condition.
This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.