< Summary

Information
Class: ShopGuard.Core.Api.ApiException
Assembly: ShopGuard.Core
File(s): /home/runner/work/ShopGuard/ShopGuard/ShopGuard/ShopGuard.Core/Api/ApiException.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 15
Line coverage: 100%
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
.ctor(...)100%11100%
get_StatusCode()100%11100%
get_ResponseBody()100%11100%

File(s)

/home/runner/work/ShopGuard/ShopGuard/ShopGuard/ShopGuard.Core/Api/ApiException.cs

#LineLine coverage
 1using System.Net;
 2
 3namespace ShopGuard.Core.Api;
 4
 5/// <summary>
 6/// Thrown when the API returns an unexpected status code.
 7/// Carries the status code and raw response body for diagnostics in test reports.
 8/// </summary>
 9public sealed class ApiException(HttpStatusCode statusCode, string? responseBody, string message)
 210    : Exception(message)
 11{
 412    public HttpStatusCode StatusCode { get; } = statusCode;
 13
 314    public string? ResponseBody { get; } = responseBody;
 15}