Added support for error responses or errors in HTTP library.