How to check if wp_update_post was successful

You can use the $wp_error argument to return an error message.

$post_id = wp_update_post( $my_post, true );

if ( is_wp_error( $post_id ) ) {
     echo $post_id->get_error_message();
}
else {
     echo 'true';
}