Merge "Log more precise error codes for timeout etc. (and HTTP statuses)"

This commit is contained in:
jenkins-bot 2021-09-13 16:17:35 +00:00 committed by Gerrit Code Review
commit 269111d7aa

View file

@ -779,6 +779,13 @@ ReplyWidget.prototype.onReplyClick = function () {
widget.errorMessage.$element.insertBefore( widget.replyBodyWidget.$element ); widget.errorMessage.$element.insertBefore( widget.replyBodyWidget.$element );
} }
// Log more precise error codes, mw.Api just gives us 'http' in all of these cases
if ( data.textStatus === 'timeout' || data.textStatus === 'abort' || data.textStatus === 'parsererror' ) {
code = data.textStatus;
} else {
code = 'http-' + ( ( data.xhr && data.xhr.status ) || 0 );
}
logger( { logger( {
action: 'saveFailure', action: 'saveFailure',
message: code, message: code,