Handle failure from sendRequest
Use commons for base64 encoding