failsafe-lib / failsafe

Fault tolerance and resilience patterns for the JVM
https://failsafe.dev
Apache License 2.0
4.16k stars 295 forks source link

Guidance around CheckedPredicate #367

Closed ysaadi closed 11 months ago

ysaadi commented 1 year ago

In the 2.x version of this repo, we were defining a predicate in a way similar to so: Pridicate<ApiResponse<?> predicate = (response -> response.getStatusCode().isSuccessful())

With the switch to checkedResponse, this code no longer works as ApiResponse is expected to extend throwable. Any idea of what I am doing wrong/how I should approach this differently?

Tembrel commented 1 year ago

Can you give more context? What is the code that no longer works in Failsafe 3.x? The snippet you provided doesn't tell us enough.

jhalterman commented 11 months ago

Closing as stale.