Merge pull request #2000

Updates Java UserAgent Error Handling