mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
Merge pull request #86 from overleaf/em-handle-history-error
Handle errors from the history service
This commit is contained in:
@@ -52,11 +52,16 @@ public class NingHttpClient implements NingHttpClientFacade {
|
||||
@Override
|
||||
public byte[] onCompleted(
|
||||
Response response
|
||||
) throws IOException {
|
||||
) throws Exception {
|
||||
int statusCode = response.getStatusCode();
|
||||
if (statusCode >= 400) {
|
||||
throw new Exception("got status " + statusCode +
|
||||
" fetching " + url);
|
||||
}
|
||||
byte[] ret = bytes.toByteArray();
|
||||
bytes.close();
|
||||
log.info(
|
||||
response.getStatusCode()
|
||||
statusCode
|
||||
+ " "
|
||||
+ response.getStatusText()
|
||||
+ " ("
|
||||
|
||||
Reference in New Issue
Block a user