mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
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:
@@ -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();
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user