using Grpc.Core;
using MxGateway.Contracts.Proto;
namespace MxGateway.Client;
/// Exception thrown when an API key is invalid, expired, or malformed.
public sealed class MxGatewayAuthenticationException : MxGatewayException
{
/// Initializes a new instance with the given details.
/// The error message describing the authentication failure.
/// The session ID, if available.
/// The correlation ID for tracing, if available.
/// The protocol status details, if available.
/// The HResult code, if available.
/// The MXAccess statuses, if available.
/// The underlying exception, if any.
/// The gRPC status code reported by the failed call, if available.
public MxGatewayAuthenticationException(
string message,
string? sessionId = null,
string? correlationId = null,
ProtocolStatus? protocolStatus = null,
int? hResult = null,
IReadOnlyList? statuses = null,
Exception? innerException = null,
StatusCode? statusCode = null)
: base(
message,
sessionId,
correlationId,
protocolStatus,
hResult,
statuses ?? [],
innerException,
statusCode)
{
}
}