Closed stevegrunwell closed 7 years ago
This PR ensures that if wp_remote_request() (called in API::make_authenticated_request()) returns a WP_Error object, API::decode_json_response() will return that error rather than attempting (and failing) to JSON-decode it.
wp_remote_request()
API::make_authenticated_request()
WP_Error
API::decode_json_response()
Fixes #58.
This PR ensures that if
wp_remote_request()
(called inAPI::make_authenticated_request()
) returns aWP_Error
object,API::decode_json_response()
will return that error rather than attempting (and failing) to JSON-decode it.Fixes #58.