One explanation for –> An unexpected error occurred…..
-
I’m not sure why the coder of plugin-install.php decided to keep all users in the dark as to the reason why this message is displayed (“An unexpected error occurred. Something may be wrong with www.ads-software.com or this server’s configuration.”) but I’ve found that it does (at least in this case) return a perfectly reasonable error response.
In this case, the api call times out but I only found that out by manually forcing it to display the error msg (something like ‘http_timeout’). I changed
‘timeout’ => 15 to ‘timeout’ => 25 in the request below and everything was fine.if ( false === $res ) { $request = wp_remote_post('https://api.www.ads-software.com/plugins/info /1.0/', array( 'timeout' => 15, 'body' => array('action' => $action, 'request' = > serialize($args))) ); if ( is_wp_error($request) ) { $res = new WP_Error('plugins_api_failed', __( 'An unexpe cted error occurred. Something may be wrong with www.ads-software.com or this server 217;s configuration. If you continue to have problems, please try the <a href="h ttp://www.ads-software.com/support/">support forums</a>.' ), $request->get_error_messag e() ); } else {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘One explanation for –> An unexpected error occurred…..’ is closed to new replies.