mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-02 13:33:40 +01:00
parent
21c0c687cd
commit
88934ec39a
@ -84,9 +84,9 @@ export default async function pyloadProxyHandler(req, res) {
|
|||||||
|
|
||||||
if (data?.error || status !== 200) {
|
if (data?.error || status !== 200) {
|
||||||
try {
|
try {
|
||||||
return res.status(status).send({error: {message: "HTTP error communicating with Plex API", data: Buffer.from(data).toString()}});
|
return res.status(status).send({error: {message: "HTTP error communicating with Pyload API", data: Buffer.from(data).toString()}});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return res.status(status).send({error: {message: "HTTP error communicating with Plex API", data}});
|
return res.status(status).send({error: {message: "HTTP error communicating with Pyload API", data}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ export default async function pyloadProxyHandler(req, res) {
|
|||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error(e);
|
logger.error(e);
|
||||||
return res.status(500).send({error: {message: `Error communicating with Plex API: ${e.toString()}`}});
|
return res.status(500).send({error: {message: `Error communicating with Pyload API: ${e.toString()}`}});
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.status(400).json({ error: 'Invalid proxy service type' });
|
return res.status(400).json({ error: 'Invalid proxy service type' });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user