using Grpc.Core; using MxGateway.Contracts.Proto; namespace MxGateway.Client; /// Exception thrown when the API key lacks required scopes for an operation. public sealed class MxGatewayAuthorizationException : MxGatewayException { /// Initializes a new instance with the given details. /// The error message describing the authorization 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 MxGatewayAuthorizationException( 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) { } }