Error
- mwversion: undefined
- reqId: undefined
- Find reqId in Logstash
- Find normalized_message in Logstash
Impact
We get errors logged but no details about the error message. It looks like all the errors occur on Special:Homepage; there's probably an error that occurs when fetching tasks or metadata for tasks.
Notes
handleError in GrowthTasksApi.js looks like this:
GrowthTasksApi.prototype.handleError = function ( error, details ) { var message, isRealError = true; if ( error === 'http' && details && details.textStatus === 'abort' ) { // XHR abort, not a real error message = null; isRealError = false; } else if ( error === 'http' ) { // jQuery AJAX error; textStatus is AJAX status, exception is status code text // from server message = ( typeof details.exception === 'string' ) ? details.exception : details.textStatus; } else if ( error === 'ok-but-empty' ) { // maybe a PHP fatal; not much we can do message = error; } else if ( error instanceof Error ) { // JS error in our own code message = error.name + ': ' + error.message; } else { // API error code message = error; // DEBUG T238945 if ( !error ) { // log a snippet from the API response. Errors are at the front so // hopefully this will show what's going on. message = JSON.stringify( details ).substr( 0, 1000 ); } } if ( isRealError ) { mw.log.error( 'Fetching task suggestions failed: ' + message, error, details ); mw.errorLogger.logError( error instanceof Error ? error : new Error( message ), 'error.growthexperiments' ); } return $.Deferred().reject( message ).promise(); }
We should either find the relevant branch statement to ensure that message has a value, or (easier) check if ( isRealError && message ) before logging.