diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9172732d0..9baec9601 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -65,7 +65,7 @@ jobs:
9.0.x
- name: 🛠️ Update changelog
- uses: thomaseizinger/keep-a-changelog-new-release@3.0.0
+ uses: thomaseizinger/keep-a-changelog-new-release@3.1.0
with:
version: ${{ env.NBGV_SemVer2 }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 781da071e..00ca02203 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ All notable changes to **bUnit** will be documented in this file. The project ad
## [Unreleased]
+### Fixed
+
+- `UploadFile` should only throw an exception when the file size exceeds the maximum allowed size. Reported by [@candritzky](https://github.com/candritzky). Fixed by [@linkdotnet](https://github.com/linkdotnet).
+
## [1.30.3] - 2024-07-21
### Fixed
diff --git a/Directory.Build.props b/Directory.Build.props
index d9a96bfbf..c4b492f6a 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -52,7 +52,7 @@
-
+
-
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 991738e81..66d27a5ee 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -63,7 +63,7 @@ See the full changelog at https://github.com/bUnit-dev/bUnit/releases
-
+
diff --git a/src/bunit.web/Extensions/InputFile/InputFileExtensions.cs b/src/bunit.web/Extensions/InputFile/InputFileExtensions.cs
index 39c6d7395..1611c3772 100644
--- a/src/bunit.web/Extensions/InputFile/InputFileExtensions.cs
+++ b/src/bunit.web/Extensions/InputFile/InputFileExtensions.cs
@@ -38,9 +38,9 @@ public static void UploadFiles(
uploadTask.GetAwaiter().GetResult();
}
- if (uploadTask.Exception is { InnerException: not null } e)
+ if (uploadTask.Exception?.InnerException is IOException e)
{
- ExceptionDispatchInfo.Capture(e.InnerException).Throw();
+ ExceptionDispatchInfo.Capture(e).Throw();
}
}
}
diff --git a/src/bunit.web/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs b/src/bunit.web/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs
index 59c80ac56..bfaf1c71c 100644
--- a/src/bunit.web/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs
+++ b/src/bunit.web/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs
@@ -47,9 +47,15 @@ protected internal override Task