It's ok to log the error stream in case of error. But the original exception should be re thrown afterwards. There's no point to attempt token extraction on that response. This is still an error condition