mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-06 04:51:44 -07:00
fix: better zt controller error handling
This commit is contained in:
parent
ce9f7943c0
commit
d7f2e15328
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,10 @@
|
||||||
const api = require("../utils/controller-api");
|
const api = require("../utils/controller-api");
|
||||||
|
|
||||||
module.exports = async function () {
|
module.exports = async function () {
|
||||||
const res = await api.get("status");
|
try {
|
||||||
return res.data.address;
|
const res = await api.get("status");
|
||||||
|
return res.data.address;
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue