added better error handling

added error handling in case wp_http return a wordpress error message