cc nasazeni

This commit is contained in:
JiriUhlir
2026-06-12 13:18:35 +02:00
parent bbec747bb7
commit 1801d02e5c
89 changed files with 3541 additions and 16 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Net;
using IdokladSdk.Enums;
namespace Idoklad.Client;
/// <summary>
/// Raised when an upstream iDoklad API call does not succeed. Carries the upstream HTTP status
/// code, message and iDoklad error code so the failure can be surfaced to the caller.
/// </summary>
public sealed class IdokladApiException : Exception
{
public HttpStatusCode StatusCode { get; }
public DokladErrorCode ErrorCode { get; }
public IdokladApiException(HttpStatusCode statusCode, DokladErrorCode errorCode, string? message)
: base(string.IsNullOrWhiteSpace(message) ? "iDoklad API request failed." : message)
{
StatusCode = statusCode;
ErrorCode = errorCode;
}
}