mirror of
https://github.com/comatory/fb2iCal
synced 2025-02-17 04:00:45 +01:00
fix: handle errors on front-end when parsing event data & track them
(optionally)
This commit is contained in:
parent
ee39343f1e
commit
cfa7db4f9e
@ -59,10 +59,19 @@ const createICS = async (html, url, { logger }) => {
|
||||
promptDownload(uri)
|
||||
} catch (err) {
|
||||
parseStatusStore.set(err)
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
export const createEvent = async (url, { logger }) => {
|
||||
const html = await getEventHTML(url)
|
||||
const ics = await createICS(html, url, { logger })
|
||||
try {
|
||||
const html = await getEventHTML(url)
|
||||
const ics = await createICS(html, url, { logger })
|
||||
} catch(error) {
|
||||
logger.log({
|
||||
message: error.toString(),
|
||||
level: 'error',
|
||||
service: 'parser',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user