mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 18:21:50 +00:00
Merge "Log more precise error codes for timeout etc. (and HTTP statuses)"
This commit is contained in:
commit
269111d7aa
|
@ -779,6 +779,13 @@ ReplyWidget.prototype.onReplyClick = function () {
|
|||
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( {
|
||||
action: 'saveFailure',
|
||||
message: code,
|
||||
|
|
Loading…
Reference in a new issue