NoMatchingDataException¶
NoMatchingDataException is a concrete SAIFException subtype signaling that a requested resource or record could not be found, with a fixed default message of "Error: No matching data." when constructed with no arguments (BR-CORE-003). It is thrown by SAIF.Web.API.Clients's ExceptionHandler.ToKnownError when an HTTP 404 response is received.
Purpose¶
- Provide a strongly-typed "not found" signal for consumers, in place of raw
404status handling (BR-CORE-003). - Guarantee a non-empty, human-readable default message even when no explicit message is supplied (BR-CORE-003).
Context¶
- Namespace:
SAIF.API.Exceptions - Assembly/package:
SAIF.Web.API.Core(bundled into theSAIF.Web.API.ClientsNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
NoMatchingDataException() |
NoMatchingDataException() |
Constructs the exception with the fixed default message "Error: No matching data." (BR-CORE-003). |
NoMatchingDataException(string message) |
NoMatchingDataException(string message) |
Constructs the exception with a caller-supplied message. |
NoMatchingDataException(string message, Exception innerException) |
NoMatchingDataException(string message, Exception innerException) |
Constructs the exception with a caller-supplied message and a wrapped inner exception. |
NoMatchingDataException(SerializationInfo info, StreamingContext context) |
NoMatchingDataException(SerializationInfo info, StreamingContext context) |
Standard .NET exception deserialization constructor. |
Inherited public members¶
Members in this section are inherited from SAIFException in SAIF.Web.API.Core. They are available on this type through inheritance.
| Member | Signature | Purpose | Origin |
|---|---|---|---|
HttpStatusCode |
HttpStatusCode HttpStatusCode { get; set; } |
Associates an HTTP status code with this exception instance; not set by any constructor in this library — assigned by the consumer after construction (BR-CORE-002). | SAIF.Web.API.Core — SAIFException |
Behavioral notes¶
- No constructor on this type or on
SAIFExceptionassigns a defaultHttpStatusCode; a consumer such asExceptionHandler.ToKnownErrorsets it explicitly after construction.
Constraints and usage notes¶
- No
sealedkeyword is present on this type, but it is not subclassed within this library.
This page contains no inferred, unknown, or dependency-sourced statements requiring a note box.
Sources¶
src/SAIF.Web.API.Core/SAIFException.cssrc/SAIF.Web.API.Clients/ExceptionHandler.cs