Add response text to exception message when authlib-injector meta is malformed

This commit is contained in:
yushijinhun 2018-11-24 20:33:46 +08:00
parent ea5b31d537
commit 8cdab4710b
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4

View File

@ -175,10 +175,11 @@ public class AuthlibInjectorServer implements Observable {
private void refreshMetadata(byte[] rawResponse) throws IOException {
long timestamp = System.currentTimeMillis();
String text = new String(rawResponse, UTF_8);
try {
setMetadataResponse(new String(rawResponse, UTF_8), timestamp);
setMetadataResponse(text, timestamp);
} catch (JsonParseException e) {
throw new IOException("Malformed response", e);
throw new IOException("Malformed response\n" + text, e);
}
metadataRefreshed = true;