guardian / crossword-uploader

Repository for the AWS lambda functions used to upload crosswords
0 stars 0 forks source link

Close response to avoid warning #37

Closed kenoir closed 1 year ago

kenoir commented 1 year ago

What does this change?

The PDF uploader currently reports errors of the type:

WARNING: A connection to ... was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

This is because we are not closing the response, we address that here. This should not cause issues currently as the low volume and lambda environment mean that leaking the connection should not be an issue, in any case we should remove the error log.

How to test

How can we measure success?

Cleaner logs.