Title: Improved error handling
Last modified: July 6, 2023

---

# Improved error handling

 *  [Mark Westguard](https://wordpress.org/support/users/westguard/)
 * (@westguard)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/improved-error-handling/)
 * Hi ZeptoMail team
 * I am the lead developer of WS Form ([https://wsform.com](https://wsform.com))
   and I wondered if you might be able to improve the error handling from your API.
 * At present if an error occurs from your `wp_remote_post`, you return `false`.
   However your API response includes other data such as:
 * `{"error":{"code":"TM_4001","details":[{"code":"SM_111","target_value":"***@gmail.
   com","message":"Sender address not verified","target":"from"}],"message":"Access
   Denied","request_id":"***"}}`
 * It would be great if you could do a `wp_mail_failed` action containing the error
   message so that we can show these errors to the user.
 * [https://developer.wordpress.org/reference/hooks/wp_mail_failed/](https://developer.wordpress.org/reference/hooks/wp_mail_failed/)
 * At present we’re unable to show any debug information to the user.
 * Many thanks
 * Mark

Viewing 1 replies (of 1 total)

 *  Plugin Author [Zoho Mail](https://wordpress.org/support/users/zmintegration/)
 * (@zmintegration)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/improved-error-handling/#post-16886079)
 * Hello Mark,
 * We appreciate the time you spent and thanks for sharing this with us. We will
   forward this to our backend team to better handle the errors in the future. 
 * Kindly bear with us till then. 
 * Regards,
   ZeptoMail team

Viewing 1 replies (of 1 total)

The topic ‘Improved error handling’ is closed to new replies.

 * ![](https://ps.w.org/transmail/assets/icon-256x256.png?rev=2372126)
 * [Zoho ZeptoMail](https://wordpress.org/plugins/transmail/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/transmail/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/transmail/)
 * [Active Topics](https://wordpress.org/support/plugin/transmail/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/transmail/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/transmail/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Zoho Mail](https://wordpress.org/support/users/zmintegration/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/improved-error-handling/#post-16886079)
 * Status: not resolved