Files
git.stella-ops.org/src/StellaOps.Concelier.Core/Aoc/ConcelierAocGuardException.cs
master 95daa159c4 feat: Implement console session management with tenant and profile handling
- Add ConsoleSessionStore for managing console session state including tenants, profile, and token information.
- Create OperatorContextService to manage operator context for orchestrator actions.
- Implement OperatorMetadataInterceptor to enrich HTTP requests with operator context metadata.
- Develop ConsoleProfileComponent to display user profile and session details, including tenant information and access tokens.
- Add corresponding HTML and SCSS for ConsoleProfileComponent to enhance UI presentation.
- Write unit tests for ConsoleProfileComponent to ensure correct rendering and functionality.
2025-10-28 09:59:09 +02:00

33 lines
1.1 KiB
C#

using System.Collections.Immutable;
using StellaOps.Aoc;
namespace StellaOps.Concelier.Core.Aoc;
/// <summary>
/// Represents an Aggregation-Only Contract violation produced while validating a raw advisory document.
/// </summary>
public sealed class ConcelierAocGuardException : Exception
{
public ConcelierAocGuardException(AocGuardResult result)
: base("AOC guard validation failed for the provided raw advisory document.")
{
Result = result ?? throw new ArgumentNullException(nameof(result));
}
/// <summary>
/// Guard evaluation result containing the individual violations.
/// </summary>
public AocGuardResult Result { get; }
/// <summary>
/// Collection of violations returned by the guard.
/// </summary>
public ImmutableArray<AocViolation> Violations => Result.Violations;
/// <summary>
/// Primary error code (`ERR_AOC_00x`) associated with the guard failure.
/// </summary>
public string PrimaryErrorCode =>
Violations.IsDefaultOrEmpty ? "ERR_AOC_000" : Violations[0].ErrorCode;
}