mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-08 14:38:47 +00:00
Simplify error catching
This commit is contained in:
parent
00163d2f44
commit
8a783ba9f6
41 changed files with 93 additions and 113 deletions
|
@ -67,7 +67,7 @@ export default async function plexProxyHandler(req, res) {
|
|||
let [status, apiData] = await fetchFromPlexAPI("/status/sessions", widget);
|
||||
|
||||
if (status !== 200) {
|
||||
return res.status(status).json({error: {message: "HTTP error communicating with Plex API", data: apiData}});
|
||||
return res.status(status).json({error: {message: "HTTP error communicating with Plex API", data: Buffer.from(apiData).toString()}});
|
||||
}
|
||||
|
||||
if (apiData && apiData.MediaContainer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue