} catch (StatusCodeException exception) {
if (exception.getStatusCode() == 0) {
// No idea why a status code of zero means "nothing received"...?
return this.generateNoResponseReceivedError(exception);
} else {
HttpStatusCode statusCode = HttpStatusCode.convert(exception.getStatusCode());
switch(statusCode) {
case UNAUTHORIZED:
case FORBIDDEN:
return this.generateNotAuthorizedError(statusCode);
default: