diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..3bc90e6
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,27 @@
+name: Test
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ name: ${{ matrix.os }} / .NET ${{ matrix.dotnet }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ dotnet: ['8.0', '9.0', '10.0']
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
+ - uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73
+ with:
+ dotnet-version: ${{ matrix.dotnet }}.x
+ - run: dotnet restore IPGeolocation.sln -p:TestTargetFramework=net${{ matrix.dotnet }} -p:NuGetAudit=true -p:NuGetAuditMode=all '-warnaserror:NU1900,NU1901,NU1902,NU1903,NU1904'
+ - run: dotnet test IPGeolocation.sln --no-restore -c Release -p:TestTargetFramework=net${{ matrix.dotnet }}
+ - run: dotnet pack src/IPGeolocation/IPGeolocation.csproj --no-build -c Release -o artifacts
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ac2ffd..1a4cb7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 3.0.1
+
+- Hide API keys in error messages and details.
+- Handle incomplete or invalid error responses.
+- Fix request handling for very short or very long timeouts.
+- Add Arabic (`ar`) for single and bulk lookups.
+
+Existing public methods and .NET Standard 2.1 support remain unchanged.
+
## 3.0.0 - 2026-04-08
- Replaced the old generated multi-API SDK with the new .NET SDK for the IPGeolocation.io IP Location API.
diff --git a/README.md b/README.md
index 8acce79..c0363e3 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ Install-Package IPGeoLocation.IPGeolocation
```
```xml
-
+
```
- NuGet package: `IPGeoLocation.IPGeolocation`
@@ -144,10 +144,10 @@ Paid plans still need `include` for optional modules. `fields` and `excludes` on
| `apiKey` | `string?` | unset | Required for bulk lookup. Optional for single lookup if `requestOrigin` is set. |
| `requestOrigin` | `string?` | unset | Must be an absolute `http` or `https` origin. |
| `baseUrl` | `string` | `https://api.ipgeolocation.io` | Override the API base URL. |
-| `connectTimeout` | `TimeSpan` | `10` seconds | Time to open the connection. |
-| `readTimeout` | `TimeSpan` | `30` seconds | Time to wait while reading the response body. |
+| `connectTimeout` | `TimeSpan` | `10` seconds | Time to connect and receive response headers. |
+| `readTimeout` | `TimeSpan` | `30` seconds | Time to wait for the next part of the response. |
-The client constructor accepts an `IpGeolocationClientConfig`. Timeouts are validated before the request is sent.
+The client constructor accepts an `IpGeolocationClientConfig`. Both timeouts must be greater than zero.
## Available Methods
@@ -168,7 +168,7 @@ The client constructor accepts an `IpGeolocationClientConfig`. Timeouts are vali
|-------|------------|-------|
| `ip` | Single lookup | IPv4, IPv6, or domain. Omit it for caller IP lookup. |
| `ips` | Bulk lookup | Collection of 1 to 50,000 IPs or domains. |
-| `lang` | Single and bulk | One of `en`, `de`, `ru`, `ja`, `fr`, `cn`, `es`, `cs`, `it`, `ko`, `fa`, `pt`. |
+| `lang` | Single and bulk | One of `en`, `de`, `ru`, `ja`, `fr`, `cn`, `es`, `cs`, `it`, `ko`, `fa`, `pt`, `ar`. |
| `include` | Single and bulk | Collection of module names such as `security`, `abuse`, `user_agent`, `hostname`, `liveHostname`, `hostnameFallbackLive`, `geo_accuracy`, `dma_code`, or `*`. |
| `fields` | Single and bulk | Collection of field paths to keep, for example `location.country_name` or `security.threat_score`. |
| `excludes` | Single and bulk | Collection of field paths to remove from the response. |
@@ -327,7 +327,7 @@ Console.WriteLine(response.Metadata.FirstHeaderValue("content-type"));
## Errors
-The SDK throws typed exceptions instead of returning error objects for failed HTTP responses.
+The SDK throws typed exceptions instead of returning error objects for failed HTTP responses. SDK error messages replace your configured API key with `[REDACTED]`. SDK error types and HTTP status codes stay the same. Some technical error details may be shortened to keep the key hidden.
| Exception | When it happens |
|-----------|-----------------|
diff --git a/src/IPGeolocation.Test/IPGeolocation.Test.csproj b/src/IPGeolocation.Test/IPGeolocation.Test.csproj
index 380aacf..d42caaa 100644
--- a/src/IPGeolocation.Test/IPGeolocation.Test.csproj
+++ b/src/IPGeolocation.Test/IPGeolocation.Test.csproj
@@ -3,7 +3,8 @@
IPGeolocation.Test
IPGeolocation.Test
- net8.0
+ net8.0
+ $(TestTargetFramework)
false
enable
disable
diff --git a/src/IPGeolocation.Test/IpLocation/ErrorHandlingTests.cs b/src/IPGeolocation.Test/IpLocation/ErrorHandlingTests.cs
new file mode 100644
index 0000000..2201e34
--- /dev/null
+++ b/src/IPGeolocation.Test/IpLocation/ErrorHandlingTests.cs
@@ -0,0 +1,321 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using IPGeolocation.Internal;
+using IPGeolocation.Test.IpLocation.Support;
+using Xunit;
+
+namespace IPGeolocation.Test.IpLocation;
+
+public sealed class ErrorHandlingTests
+{
+ private const string ApiKey = "test-secret+/value";
+
+ public static IEnumerable