PluginProbe
ZIP AI – AI Website Builder & AI Agent / 0.0.13
ZIP AI – AI Website Builder & AI Agent v0.0.13
0.0.14 0.0.13 0.0.12 0.0.11 0.0.10 0.0.9 trunk 0.0.4 0.0.5 0.0.6 0.0.7 0.0.8
← All changes | inc/core/response.php +8 -1 0.0.9 → 0.0.13 View file →
@@ -96,7 +96,14 @@
96 96 if ( ! is_wp_error( $wp_error ) ) {
97 97 return self::error( 'An unknown error occurred.' );
98 98 }
99 99
100 - return self::error( $wp_error->get_error_message() );
100 + // Carry the machine-readable code alongside the prose. The brain
101 + // classifies and steers a refused write on `data.code`; without it the
102 + // only signal on the wire is an English sentence that unrelated PRs
103 + // reword.
104 + $code = (string) $wp_error->get_error_code();
105 + $data = '' !== $code ? array( 'code' => $code ) : array();
106 +
107 + return self::error( $wp_error->get_error_message(), '', $data );
101 108 }
102 109 }