mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 07:41:13 +00:00
Using console.error for error logs.
This commit is contained in:
parent
a4f023d250
commit
4f5d4418bb
7 changed files with 9 additions and 4 deletions
|
@ -90,6 +90,7 @@ server.get("/*", async (req, res) => {
|
||||||
// Redirect to the 404 if there's an API error
|
// Redirect to the 404 if there's an API error
|
||||||
if (routeData[0] && routeData[0].error) {
|
if (routeData[0] && routeData[0].error) {
|
||||||
let errCode = routeData[0].error;
|
let errCode = routeData[0].error;
|
||||||
|
console.error(errCode);
|
||||||
return res.redirect(`/404?err=${errCode}`);
|
return res.redirect(`/404?err=${errCode}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +175,8 @@ server.get("/*", async (req, res) => {
|
||||||
</html>
|
</html>
|
||||||
`);
|
`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
|
return res.redirect(`/404?err=${err}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,7 @@ export class ImageUploadForm extends Component<
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
i.state.loading = false;
|
i.state.loading = false;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
|
console.error(error);
|
||||||
toast(error, "danger");
|
toast(error, "danger");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,6 +365,7 @@ export class MarkdownTextArea extends Component<
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
i.state.imageLoading = false;
|
i.state.imageLoading = false;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
|
console.error(error);
|
||||||
toast(error, "danger");
|
toast(error, "danger");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -796,7 +796,7 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}, 400),
|
}, 400),
|
||||||
false
|
false
|
||||||
|
|
|
@ -565,6 +565,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
i.state.imageLoading = false;
|
i.state.imageLoading = false;
|
||||||
i.setState(i.state);
|
i.setState(i.state);
|
||||||
|
console.error(error);
|
||||||
toast(error, "danger");
|
toast(error, "danger");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -785,7 +785,7 @@ export class Search extends Component<any, SearchState> {
|
||||||
choices.unshift({ value: "0", label: i18n.t("all") });
|
choices.unshift({ value: "0", label: i18n.t("all") });
|
||||||
this.communityChoices.setChoices(choices, "value", "label", true);
|
this.communityChoices.setChoices(choices, "value", "label", true);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}, 400),
|
}, 400),
|
||||||
false
|
false
|
||||||
|
|
|
@ -27,7 +27,7 @@ export class WebSocketService {
|
||||||
try {
|
try {
|
||||||
obs.next(JSON.parse(e.data.toString()));
|
obs.next(JSON.parse(e.data.toString()));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.onOpen(() => {
|
.onOpen(() => {
|
||||||
|
|
Loading…
Reference in a new issue