File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
main/java/org/springframework/web/reactive/function/client
test/java/org/springframework/web/reactive/function/client Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ public Mono<ClientResponse> exchange() {
471
471
final AtomicBoolean responseReceived = new AtomicBoolean ();
472
472
return responseMono
473
473
.doOnNext (response -> responseReceived .set (true ))
474
- .doOnError (observationContext :: setError )
474
+ .doOnError (observation :: error )
475
475
.doFinally (signalType -> {
476
476
if (signalType == SignalType .CANCEL && !responseReceived .get ()) {
477
477
observationContext .setAborted (true );
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ void recordsObservationForErrorExchange() {
110
110
StepVerifier .create (client .get ().uri ("/path" ).retrieve ().bodyToMono (Void .class ))
111
111
.expectError (IllegalStateException .class )
112
112
.verify (Duration .ofSeconds (5 ));
113
- assertThatHttpObservation ().hasLowCardinalityKeyValue ("exception" , "IllegalStateException" )
113
+ assertThatHttpObservation ().hasError ()
114
+ .hasLowCardinalityKeyValue ("exception" , "IllegalStateException" )
114
115
.hasLowCardinalityKeyValue ("status" , "CLIENT_ERROR" );
115
116
}
116
117
@@ -172,7 +173,7 @@ void recordsObservationWithResponseDetailsWhenFilterFunctionErrors() {
172
173
StepVerifier .create (responseMono )
173
174
.expectError (IllegalStateException .class )
174
175
.verify (Duration .ofSeconds (5 ));
175
- assertThatHttpObservation ()
176
+ assertThatHttpObservation (). hasError ()
176
177
.hasLowCardinalityKeyValue ("exception" , "IllegalStateException" )
177
178
.hasLowCardinalityKeyValue ("status" , "200" );
178
179
}
You can’t perform that action at this time.
0 commit comments