diff --git a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala index fac9d02eef..74e57fae96 100644 --- a/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala +++ b/delta/plugins/storage/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala @@ -74,6 +74,7 @@ object FormDataExtractor { ): IO[FileRejection, (FileDescription, BodyPartEntity)] = { val sizeLimit = Math.min(storageAvailableSpace.getOrElse(Long.MaxValue), maxFileSize) IO.deferFuture(um(entity.withSizeLimit(sizeLimit))) + .mapError(onError) .flatMap { formData => IO.fromFuture( formData.parts