Skip to content

Commit

Permalink
fix: api request should return error message, if fails
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed Jul 4, 2019
1 parent 633ddf6 commit 51e180e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private function request( $path, $method = 'GET', $params = array(), $extra_head
$response = wp_remote_request( $url, $args );

if ( is_wp_error( $response ) ) {
return false;
return $response;
}

$response = wp_remote_retrieve_body( $response );
Expand Down

0 comments on commit 51e180e

Please sign in to comment.