mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 23:38:46 +00:00
silenced more request errors + small fix in display logic
This commit is contained in:
parent
9f008fc04e
commit
a880cdbc68
2 changed files with 8 additions and 8 deletions
|
@ -27,8 +27,8 @@ export default async function octoPrintProxyHandler(req, res, map) {
|
|||
let resultData = data;
|
||||
|
||||
if (!validateWidgetData(widget, endpoint, resultData)) {
|
||||
if (status === 500 && widget.silencePrinterNotFound) {
|
||||
resultData = 500;
|
||||
if ((status === 500 || status === 502 || status === 409) && widget.silencePrinterNotFound) {
|
||||
resultData = { state: { text: "Not found" } };
|
||||
return res.status(status).send(resultData);
|
||||
}
|
||||
return res.status(status).json({ error: { message: "Invalid data", url, data: resultData } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue