Class NotFoundError
- Namespace
- FunctionalDdd
- Assembly
- FunctionalDdd.RailwayOrientedProgramming.dll
Represents a "not found" error when a requested resource does not exist. Use this when an entity, record, or resource cannot be located. Maps to HTTP 404 Not Found.
public sealed class NotFoundError : Error, IEquatable<Error>
- Inheritance
-
NotFoundError
- Implements
- Inherited Members
- Extension Methods
Examples
Error.NotFound($"User with ID {userId} not found", userId)
Error.NotFound("Product SKU-123 not found in catalog")
Error.NotFound("Order not found", orderId)
Remarks
Use this for missing resources, not for empty collections or null-but-valid scenarios. Include the resource type and identifier in the detail message when possible.
Constructors
NotFoundError(string, string, string?)
Initializes a new instance of the NotFoundError class.
public NotFoundError(string detail, string code, string? instance = null)