|
|
|
@ -117,7 +117,7 @@ public abstract class AbstractMessageReaderArgumentResolver extends HandlerMetho |
|
|
|
Map<String, Object> readHints = Collections.emptyMap(); |
|
|
|
Map<String, Object> readHints = Collections.emptyMap(); |
|
|
|
if (adapter != null && adapter.isMultiValue()) { |
|
|
|
if (adapter != null && adapter.isMultiValue()) { |
|
|
|
Flux<?> flux = reader.read(bodyType, elementType, request, response, readHints); |
|
|
|
Flux<?> flux = reader.read(bodyType, elementType, request, response, readHints); |
|
|
|
flux = flux.onErrorResumeWith(ex -> Flux.error(getReadError(bodyParameter, ex))); |
|
|
|
flux = flux.onErrorResume(ex -> Flux.error(getReadError(bodyParameter, ex))); |
|
|
|
if (isBodyRequired || !adapter.supportsEmpty()) { |
|
|
|
if (isBodyRequired || !adapter.supportsEmpty()) { |
|
|
|
flux = flux.switchIfEmpty(Flux.error(getRequiredBodyError(bodyParameter))); |
|
|
|
flux = flux.switchIfEmpty(Flux.error(getRequiredBodyError(bodyParameter))); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -130,7 +130,7 @@ public abstract class AbstractMessageReaderArgumentResolver extends HandlerMetho |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
Mono<?> mono = reader.readMono(bodyType, elementType, request, response, readHints); |
|
|
|
Mono<?> mono = reader.readMono(bodyType, elementType, request, response, readHints); |
|
|
|
mono = mono.switchOnError(ex -> Mono.error(getReadError(bodyParameter, ex))); |
|
|
|
mono = mono.onErrorResume(ex -> Mono.error(getReadError(bodyParameter, ex))); |
|
|
|
if (isBodyRequired || (adapter != null && !adapter.supportsEmpty())) { |
|
|
|
if (isBodyRequired || (adapter != null && !adapter.supportsEmpty())) { |
|
|
|
mono = mono.switchIfEmpty(Mono.error(getRequiredBodyError(bodyParameter))); |
|
|
|
mono = mono.switchIfEmpty(Mono.error(getRequiredBodyError(bodyParameter))); |
|
|
|
} |
|
|
|
} |
|
|
|
|