Class ApiException
- Namespace
- Tudormobile.OpenTrivia
- Assembly
- Tudormobile.OpenTrivia.dll
Represents errors that occur when an API request fails or returns an unexpected response.
public class ApiException : Exception, ISerializable
- Inheritance
-
ApiException
- Implements
- Inherited Members
Remarks
Use this exception to handle failures related to API operations, such as invalid responses, connectivity issues, or unexpected status codes. This exception is typically thrown by methods interacting with external APIs to signal that the operation could not be completed successfully.
Constructors
ApiException()
Initializes a new instance of the ApiException class.
public ApiException()
ApiException(string)
Initializes a new instance of the ApiException class with a specified error message.
public ApiException(string message)
Parameters
messagestringThe message that describes the error.
ApiException(string, Exception)
Initializes a new instance of the ApiException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public ApiException(string message, Exception inner)