< Summary

Information
Class: Services.ApiServices.ArmtekApi.ArmtekApiException
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/ArmtekApi/ArmtekApiException.cs
Line coverage
62%
Covered lines: 5
Uncovered lines: 3
Coverable lines: 8
Total lines: 29
Line coverage: 62.5%
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 Crap Score Cyclomatic complexity Line coverage
get_ArmtekStatus()100%210%
get_Messages()100%210%
get_RequestUri()100%210%
.ctor(...)100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/ArmtekApi/ArmtekApiException.cs

#LineLine coverage
 1using Services.ApiServices.ArmtekApi.Models.Envelope;
 2
 3namespace Services.ApiServices.ArmtekApi;
 4
 5/// <summary>
 6/// Транспортная ошибка обращения к Armtek Web-Services: не-2xx HTTP после исчерпания ретраев,
 7/// либо тело ответа не парсится как конверт STATUS/MESSAGES/RESP. НЕ используется для бизнес-ошибок
 8/// внутри валидного конверта (MESSAGES[].TYPE == E/A) — те возвращаются вызывающему коду как есть
 9/// через ArmtekResponse&lt;T&gt;.HasErrors, без исключений.
 10/// </summary>
 11public class ArmtekApiException : Exception
 12{
 013    public int? ArmtekStatus { get; }
 014    public IReadOnlyList<ArmtekMessage>? Messages { get; }
 015    public string? RequestUri { get; }
 16
 17    public ArmtekApiException(
 18        string message,
 19        int? armtekStatus = null,
 20        IReadOnlyList<ArmtekMessage>? messages = null,
 21        string? requestUri = null,
 22        Exception? inner = null)
 823        : base(message, inner)
 24    {
 825        ArmtekStatus = armtekStatus;
 826        Messages = messages;
 827        RequestUri = requestUri;
 828    }
 29}