copyhackers / airstory-wp

Send your blog posts from Airstory writing software to WordPress for publication.
https://wordpress.org/plugins/airstory
MIT License
4 stars 1 forks source link

Better handling of WP_Errors in Airstory API responses. #59

Closed stevegrunwell closed 7 years ago

stevegrunwell commented 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.

Fixes #58.