Namespace CivitaiSharp.Core.Response
Classes
- Error
Represents an error encountered during an operation. Contains a typed ErrorCode for programmatic handling, plus a human-readable message and optional context for diagnostics. Use pattern matching on Code to handle specific error conditions, and check Details for field-level validation errors.
- HttpErrorMapper
Provides utilities for mapping HTTP responses to Error instances. Centralizes HTTP error handling logic including RFC 7807 problem details parsing for consistent behavior across CivitaiSharp libraries.
- PagedResult<T>
Represents a page of items along with pagination metadata.
- Result<T>
Discriminated union representing the result of an operation as either success with data or failure with error information. Use pattern matching for exhaustive handling of success and error cases.
- Result<T>.Failure
Represents a failed operation result.
- Result<T>.Success
Represents a successful operation result.
Structs
- Unit
Represents a void result type for API operations that return no data. Use this as the type parameter for Result<T> when the operation succeeds but returns no meaningful response body.
Enums
- ErrorCode
Categorized error codes for operations across the CivitaiSharp libraries.