add error handling and parsing of Bad Requests
move errors.clear call
Merge pull request #3 from jsmestad/feature/links-parsing

Add error handling and parsing of Bad Requests