Improve TwitterAuthService error logging

This commit is contained in:
Tim
2025-07-16 19:56:13 +08:00
parent ba8e2a4947
commit 8afc80c2b5

View File

@@ -63,7 +63,7 @@ public class TwitterAuthService {
tokenRes = restTemplate.postForEntity(tokenUrl, new HttpEntity<>(body, headers), JsonNode.class);
logger.debug("Token response: {}", tokenRes.getBody());
} catch (HttpClientErrorException e) {
logger.debug("Token request failed", e);
logger.warn("Token request failed with status {} and body {}", e.getStatusCode(), e.getResponseBodyAsString());
return Optional.empty();
}