← All changes
|
includes/integrations/class-google-search-console-client.php
+6
-0
2.10.0
→
2.12.0
View file →
| @@ -61,10 +61,16 @@ | ||
| 61 | 61 | 'message' => 'Google Search Console API connection successful', |
| 62 | 62 | 'sites_count' => count($result['siteEntry'] ?? []) |
| 63 | 63 | ]; |
| 64 | 64 | } catch (\Exception $e) { |
| 65 | + // `message` as well as `error`: the success branch above reports | |
| 66 | + // its outcome as `message`, and every consumer reads that key, so | |
| 67 | + // a failure that only set `error` was reported to the admin as an | |
| 68 | + // error with no reason at all (#852). `error` is kept for any | |
| 69 | + // caller that already reads it. | |
| 65 | 70 | return [ |
| 66 | 71 | 'success' => false, |
| 72 | + 'message' => $e->getMessage(), | |
| 67 | 73 | 'error' => $e->getMessage() |
| 68 | 74 | ]; |
| 69 | 75 | } |
| 70 | 76 | } |