add error handling and parsing of Bad Requests