settings: Remove broken default streams error handler.

For unknown reasons, 6f7b973d3b
introduced an invalid semi-duplicate call to ui_report.error that
passed the wrong number of parameters.

We should just call `ui_report.error`, which already had logic to
handle the distinction between 40x and 50x errors.

Fixes an issue reported in #18273.
This commit is contained in:
Tim Abbott
2021-04-27 23:15:38 -07:00
parent 9dd88e845a
commit a6f4230895

View File

@@ -80,11 +80,7 @@ function make_stream_default(stream_id) {
url: "/json/default_streams",
data,
error(xhr) {
if (xhr.status.toString().charAt(0) === "4") {
ui_report.error($t_html({defaultMessage: "Failed"}), xhr, default_stream_status);
} else {
ui_report.error($t_html({defaultMessage: "Failed"}), default_stream_status);
}
ui_report.error($t_html({defaultMessage: "Failed"}), xhr, default_stream_status);
default_stream_status.show();
},
});