mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
Fix ping system API return codes
This commit is contained in:
@@ -17,7 +17,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
} else if (error.code === 'ECONNABORTED') {
|
} else if (error.code === 'ECONNABORTED') {
|
||||||
res.status(408).json('Request Timeout');
|
res.status(408).json('Request Timeout');
|
||||||
} else {
|
} else {
|
||||||
res.status(500).json('Server Error');
|
res.status(error.response ? error.response.status : 500).json('Server Error');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// // Make a request to the URL
|
// // Make a request to the URL
|
||||||
|
|||||||
Reference in New Issue
Block a user