implement error parsing
catch if connection was not possible
simplify result checking, moved statusCode to response struct