fix(java): resolve feign ambiguity in ApiErrorDecoder fix(#17842) (#17843)

This commit is contained in:
Ruokki
2024-02-28 05:06:57 +01:00
committed by GitHub
parent 8ca914d64f
commit 149246de31
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
package org.openapitools.client.auth;
import java.util.Date;
import feign.Response;
import feign.RetryableException;
import feign.codec.ErrorDecoder;
@@ -18,7 +20,7 @@ public class ApiErrorDecoder implements ErrorDecoder {
Exception httpException = defaultErrorDecoder.decode(methodKey, response);
if (response.status() == 401 || response.status() == 403) {
return new RetryableException(response.status(), "Received status " + response.status() + " trying to renew access token",
response.request().httpMethod(), httpException, null, response.request());
response.request().httpMethod(), httpException, (Date) null, response.request());
}
return httpException;
}