Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface errors in generate_site_meta if they happen #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bradp
Copy link
Contributor

@bradp bradp commented Mar 7, 2024

We're seeing issues with message: "Error generating site meta: siteclassification". This doesn't fix it, but at least surfaces a more descriptive error.

@@ -117,7 +117,7 @@ public static function instantiate_site_meta( $site_info, $identifier, $skip_cac
// Handle the error case by returning a WP_Error.
return new \WP_Error(
'nfd_onboarding_error',
__( 'Error generating site meta: ', 'wp-module-onboarding' ) . $identifier,
__( 'Error generating site meta: ', 'wp-module-onboarding' ) . $identifier . ' ' . $response['error'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Sitegen class also returns an array sometimes for the same object $response['error'] and sometimes a String, Need to find a better way else we might still be not able to surface the errors.

Screenshot 2024-03-12 at 9 54 31 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Review Code Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants