@@ -480,7 +480,7 @@ public void retryableExceptionInDecoder() throws Exception {
480480 public Object decode (Response response , Type type ) throws IOException {
481481 String string = super .decode (response , type ).toString ();
482482 if ("retry!" .equals (string )) {
483- throw new RetryableException (string , HttpMethod .POST , null );
483+ throw new RetryableException (response . status (), string , HttpMethod .POST , null );
484484 }
485485 return string ;
486486 }
@@ -540,7 +540,7 @@ public void ensureRetryerClonesItself() throws Exception {
540540 .errorDecoder (new ErrorDecoder () {
541541 @ Override
542542 public Exception decode (String methodKey , Response response ) {
543- return new RetryableException ("play it again sam!" , HttpMethod .POST , null );
543+ return new RetryableException (response . status (), "play it again sam!" , HttpMethod .POST , null );
544544 }
545545 }).target (TestInterface .class , "http://localhost:" + server .getPort ());
546546
@@ -564,7 +564,7 @@ public void throwsOriginalExceptionAfterFailedRetries() throws Exception {
564564 .errorDecoder (new ErrorDecoder () {
565565 @ Override
566566 public Exception decode (String methodKey , Response response ) {
567- return new RetryableException ("play it again sam!" , HttpMethod .POST ,
567+ return new RetryableException (response . status (), "play it again sam!" , HttpMethod .POST ,
568568 new TestInterfaceException (message ), null );
569569 }
570570 }).target (TestInterface .class , "http://localhost:" + server .getPort ());
@@ -587,7 +587,7 @@ public void throwsRetryableExceptionIfNoUnderlyingCause() throws Exception {
587587 .errorDecoder (new ErrorDecoder () {
588588 @ Override
589589 public Exception decode (String methodKey , Response response ) {
590- return new RetryableException (message , HttpMethod .POST , null );
590+ return new RetryableException (response . status (), message , HttpMethod .POST , null );
591591 }
592592 }).target (TestInterface .class , "http://localhost:" + server .getPort ());
593593
0 commit comments