Skip to content

Commit 67515c6

Browse files
authored
"Fault Tolerance" "SwapiService" path and error handling details
Updated "Add Retry to SwapiService" to include path parameter for film ID and revised error handling description.
1 parent 130eb4e commit 67515c6

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

documentation/modules/ROOT/pages/09_fault-tolerance.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import com.redhat.developers.Swapi.Results;
5757
@RegisterRestClient
5858
public interface SwapiService {
5959
@GET
60-
@Path("/films/")
60+
@Path("/films/{id}")
6161
@Produces(MediaType.APPLICATION_JSON)
6262
@Retry(maxRetries = 3, delay = 2000)
6363
public Swapi getFilmById(@PathParam("id") String id);
@@ -142,11 +142,9 @@ public interface SwapiService {
142142
143143
----
144144

145-
Now in case of any error, 3 retries are done automatically, waiting for 2 seconds between retries.
146-
147-
If the error persists, then the fallback method is executed.
145+
Now the request will be attempted for 2 seconds. If there is an error, then the fallback method is executed.
148146

149-
Now after waiting for 6 seconds (3 retries x 2 seconds), an empty object is sent instead of an exception.
147+
Now after waiting for 2 seconds, an empty object is sent instead of an exception.
150148

151149
== Invoke the endpoint with Retry and Fallback
152150

0 commit comments

Comments
 (0)