< Summary

Information
Class: Intentum.AI.Mistral.MistralRateLimitException
Assembly: Intentum.AI.Mistral
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.AI.Mistral/MistralRateLimitException.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 21
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%110%

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.AI.Mistral/MistralRateLimitException.cs

#LineLine coverage
 1namespace Intentum.AI.Mistral;
 2
 3/// <summary>
 4/// Thrown when Mistral API returns 429 (Too Many Requests) after exhausting retries.
 5/// Use <see cref="RetryAfterSeconds"/> to show the user how long to wait; use <see cref="ResponseBody"/> to show API er
 6/// </summary>
 7public sealed class MistralRateLimitException : HttpRequestException
 8{
 9    /// <summary>Suggested wait time in seconds from API Retry-After header, or null if not provided.</summary>
 010    public double? RetryAfterSeconds { get; }
 11
 12    /// <summary>Raw response body from Mistral (often JSON with error details).</summary>
 013    public string? ResponseBody { get; }
 14
 15    public MistralRateLimitException(double? retryAfterSeconds = null, string? responseBody = null)
 016        : base("Mistral rate limit (429). Wait and retry.")
 017    {
 018        RetryAfterSeconds = retryAfterSeconds;
 019        ResponseBody = responseBody;
 020    }
 21}