PlaytikaOSS / feign-reactive

Reactive Feign client inspired by https://github.com/OpenFeign project
Apache License 2.0
618 stars 125 forks source link

Customize OutOfRetriesException #646

Open KamaniAman opened 11 months ago

KamaniAman commented 11 months ago

we have ReactiveRectryPolicy (Basic/Filtered). Whenever retries are exhausted, it wraps the original exception with OutOfRetriesException.

How can I unwrap it?

Is there any handler available which can map it to my custom exception. For Example, We have ErrorDecoder, in which based on the http exception, I can map it to my custom exception. But this is only intercepted for http request. Which basically executes after each retry. And after all the retries, It executes the onErrorResume <- wrapWithOutOfRetriesLog <- RetryPublisherHttpClient. Which I can't intercept.

So, is there any way where I can convert OutOfRetriesException to my custom exception?

@kptfh