mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-02 05:23:39 +01:00
parent
21c0c687cd
commit
88934ec39a
@ -84,9 +84,9 @@ export default async function pyloadProxyHandler(req, res) {
|
||||
|
||||
if (data?.error || status !== 200) {
|
||||
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) {
|
||||
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) {
|
||||
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' });
|
||||
|
Loading…
x
Reference in New Issue
Block a user