RESTCLIENT.NET / API REFERENCE
Outcome.HttpError<TError>.ExceptionError
All API types · Outcome · View source
public sealed record ExceptionError(Exception Exception) : HttpError<TError>
Represents an error caused by an exception during the HTTP operation. This typically occurs due to network issues, timeouts, or other infrastructure problems. Examples: Network unreachable, connection timeout, DNS resolution failure.
| Parameter | Type | Default | Description |
|---|---|---|---|
Exception |
Exception |
Required | The exception that caused the error. |
Members
.ctor
public ExceptionError(Exception Exception);
Represents an error caused by an exception during the HTTP operation. This typically occurs due to network issues, timeouts, or other infrastructure problems. Examples: Network unreachable, connection timeout, DNS resolution failure.
| Parameter | Type | Default | Description |
|---|---|---|---|
Exception |
Exception |
Required | The exception that caused the error. |
View source: Outcome/ExceptionError.cs:17
FromException
public static new ExceptionError FromException(Exception exception);
Converts an Exception to an ExceptionError. Enables clean error creation from caught exceptions.
| Parameter | Type | Default | Description |
|---|---|---|---|
exception |
Exception |
Required | The exception to wrap. |
Returns: An ExceptionError containing the exception.
View source: Outcome/ExceptionError.cs:25
ToString
public override string ToString();
Returns a string representation of the exception error.
Returns: A string representation of the exception error.
View source: Outcome/ExceptionError.cs:31
Exception
public Exception Exception { get; init; }