-
AuthenticationError:
- Purpose: Represents an error related to authentication.
- Fields:
- Message: Provides additional information about the error.
-
APIError:
- Purpose: Represents an error related to API calls.
- Fields:
- Message: Provides additional information about the error.
- Code: Specifies the error code associated with the API error.
-
SerializationError:
- Purpose: Represents an error related to serialization.
- Fields:
- Message: Provides additional information about the error.
-
SDKError:
- Purpose: Represents a general SDK error.
- Fields:
- Message: Provides additional information about the error.
-
RequestError:
- Purpose: Represents an error related to making an authentication request.
- Fields:
- Message: Provides additional information about the error.
Each error type has an associated Error() method that returns a formatted error message based on the error type and the provided error message. Additionally, there are corresponding New functions that create and return an error instance with the specified error message.
To use these error types, you can import the error
package and utilize the respective New functions to create specific error instances when necessary.
Please note that it's important to handle and propagate errors appropriately in your code to ensure proper error handling and debugging.