Using console.error for error logs.

This commit is contained in:
Dessalines 2021-12-02 10:14:40 -05:00
parent a4f023d250
commit 4f5d4418bb
7 changed files with 9 additions and 4 deletions

View file

@ -90,6 +90,7 @@ server.get("/*", async (req, res) => {
// Redirect to the 404 if there's an API error
if (routeData[0] && routeData[0].error) {
let errCode = routeData[0].error;
console.error(errCode);
return res.redirect(`/404?err=${errCode}`);
}
@ -174,7 +175,8 @@ server.get("/*", async (req, res) => {
</html>
`);
} catch (err) {
console.log(err);
console.error(err);
return res.redirect(`/404?err=${err}`);
}
});

View file

@ -104,6 +104,7 @@ export class ImageUploadForm extends Component<
.catch(error => {
i.state.loading = false;
i.setState(i.state);
console.error(error);
toast(error, "danger");
});
}

View file

@ -365,6 +365,7 @@ export class MarkdownTextArea extends Component<
.catch(error => {
i.state.imageLoading = false;
i.setState(i.state);
console.error(error);
toast(error, "danger");
});
}

View file

@ -796,7 +796,7 @@ export class Settings extends Component<any, SettingsState> {
true
);
} catch (err) {
console.log(err);
console.error(err);
}
}, 400),
false

View file

@ -565,6 +565,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
.catch(error => {
i.state.imageLoading = false;
i.setState(i.state);
console.error(error);
toast(error, "danger");
});
}

View file

@ -785,7 +785,7 @@ export class Search extends Component<any, SearchState> {
choices.unshift({ value: "0", label: i18n.t("all") });
this.communityChoices.setChoices(choices, "value", "label", true);
} catch (err) {
console.log(err);
console.error(err);
}
}, 400),
false

View file

@ -27,7 +27,7 @@ export class WebSocketService {
try {
obs.next(JSON.parse(e.data.toString()));
} catch (err) {
console.log(err);
console.error(err);
}
})
.onOpen(() => {