feat:add Reactive filter error log

pull/25/head
SkyeBeFreeman 3 years ago
parent 2fe50390ff
commit 1b9c6e87a9

@ -84,7 +84,7 @@ public class MetadataReactiveFilter implements WebFilter, Ordered {
serverWebExchange.getAttributes() serverWebExchange.getAttributes()
.put(MetadataConstant.HeaderName.METADATA_CONTEXT, MetadataContextHolder.get()); .put(MetadataConstant.HeaderName.METADATA_CONTEXT, MetadataContextHolder.get());
return webFilterChain.filter(serverWebExchange) return webFilterChain.filter(serverWebExchange)
.doOnError(throwable -> LOG.error("handle metadata[{}] error.", MetadataContextHolder.get())) .doOnError(throwable -> LOG.error("handle metadata[{}] error.", MetadataContextHolder.get(), throwable))
.doFinally((type) -> MetadataContextHolder.remove()); .doFinally((type) -> MetadataContextHolder.remove());
} }
} }
Loading…
Cancel
Save