File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/main/java/com/arpnetworking/http Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 71
71
72
72
<properties >
73
73
<!-- Dependency versions-->
74
- <akka .version>2.5.13 </akka .version>
75
- <akka .http.version>10.1.3 </akka .http.version>
74
+ <akka .version>2.5.16 </akka .version>
75
+ <akka .http.version>10.1.5 </akka .http.version>
76
76
<apache .httpclient.version>4.5.5</apache .httpclient.version>
77
77
<apache .httpcore.version>4.4.9</apache .httpcore.version>
78
78
<arpnetworking .commons.version>1.16.1</arpnetworking .commons.version>
Original file line number Diff line number Diff line change 32
32
import akka .http .javadsl .model .ws .Message ;
33
33
import akka .japi .JavaPartialFunction ;
34
34
import akka .japi .function .Function ;
35
- import akka .japi .pf .PFBuilder ;
36
35
import akka .pattern .PatternsCS ;
37
36
import akka .stream .OverflowStrategy ;
38
37
import akka .stream .javadsl .Flow ;
@@ -105,10 +104,10 @@ public Routes(
105
104
public Flow <HttpRequest , HttpResponse , NotUsed > flow () {
106
105
return Flow .<HttpRequest >create ()
107
106
.mapAsync (1 , this )
108
- .recover (
109
- new PFBuilder < Throwable , HttpResponse >()
110
- . match ( Exception .class , e -> HttpResponse . create (). withStatus ( StatusCodes . INTERNAL_SERVER_ERROR ))
111
- . build ( ));
107
+ .recoverWithRetries (
108
+ 0 ,
109
+ Exception .class ,
110
+ () -> Source . single ( HttpResponse . create (). withStatus ( StatusCodes . INTERNAL_SERVER_ERROR ) ));
112
111
}
113
112
114
113
@ Override
You can’t perform that action at this time.
0 commit comments