mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-09 08:29:04 +01:00
better error handling
This commit is contained in:
parent
f079bb649a
commit
19bd5b3b7b
@ -10,8 +10,7 @@ export default function Component({ service }) {
|
||||
const { data: jobStats, error: jobStatsError } = useWidgetAPI(widget, "job_stats");
|
||||
|
||||
if (printerStatsError) {
|
||||
let msg
|
||||
msg = JSON.parse(new Buffer.from(printerStatsError.resultData.data).toString());
|
||||
const msg = JSON.parse(new Buffer.from(printerStatsError.resultData.data).toString());
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="OFFLINE" value={msg.error} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user