Add "ZonePlans" extensions

This commit is contained in:
2025-06-26 11:11:32 +02:00
parent 2e451bcdab
commit b5279b60a8
8 changed files with 461 additions and 1 deletions

View File

@@ -230,7 +230,8 @@ namespace AMWD.Net.Api.Cloudflare
var errorResponse = JsonConvert.DeserializeObject<CloudflareResponse<object>>(content, _jsonSerializerSettings)
?? throw new CloudflareException("Response is not a valid Cloudflare API response.");
throw new AuthenticationException(string.Join(Environment.NewLine, errorResponse.Errors.Select(e => $"{e.Code}: {e.Message}")));
string[] errors = errorResponse.Errors?.Select(e => $"{e.Code}: {e.Message}").ToArray() ?? [];
throw new AuthenticationException(string.Join(Environment.NewLine, errors));
default:
try