janboddez / share-on-mastodon

Easily share WordPress posts on Mastodon.
https://jan.boddez.net/wordpress/share-on-mastodon
GNU General Public License v3.0
39 stars 5 forks source link

Store/display API client errors #59

Closed janboddez closed 1 year ago

janboddez commented 1 year ago

Like, show an actual error message if WP/cURL can't contact the Mastodon instance/times out, etc. See also https://github.com/janboddez/share-on-mastodon/issues/56

janboddez commented 1 year ago

Much like we already do when syndicating.

janboddez commented 1 year ago

We could use a transient. Need to log errors for Options_Handler::register_app() and Options_Handler::register_app() and Options_Handler::request_access_token().

janboddez commented 1 year ago

There's so much that can go wrong and yet it's almost always the same thing, that the URL entered was wrong, which we've already made more robust. You wanna know what's up it's much easier to just enable debug logging, which will print the instance's entire response, or a WP_Error, to debug.log.