mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-19 14:12:07 +00:00
add catch to fetch
This commit is contained in:
@ -23,7 +23,7 @@ const post = async (data) => {
|
|||||||
'Access-Control-Allow-Origin': '*'
|
'Access-Control-Allow-Origin': '*'
|
||||||
}
|
}
|
||||||
const url = `http://localhost:${port}/`;
|
const url = `http://localhost:${port}/`;
|
||||||
fetch(url, { method: 'POST', headers, body: JSON.stringify({ data }) });
|
fetch(url, { method: 'POST', headers, body: JSON.stringify({ data }) }).catch(e => console.log(`Error: '${e.code || e.errno}' - when trying to access obs-tuna webserver at port ${port}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user