diff --git a/scripts/dashboard/build-dashboard.ts b/scripts/dashboard/build-dashboard.ts index 43a48185ecd9..aa69bf989236 100644 --- a/scripts/dashboard/build-dashboard.ts +++ b/scripts/dashboard/build-dashboard.ts @@ -104,10 +104,9 @@ async function getDiscussions( } return result.search.nodes.concat(await getDiscussions(query, pageSize, result.search.pageInfo.endCursor)); - } catch (e) { - logger.error(e); - - return Promise.reject(e); + } catch (error) { + logger.error(error); + throw error; } } @@ -138,10 +137,9 @@ async function getDiscussionByID(isPR: boolean, id: string): Promise { ]); await writeToFile({ hotDiscussions, goodFirstIssues }, writePath); - } catch (e) { + } catch (error) { logger.error('There were some issues parsing data from github.'); - logger.error(e); + logger.error(error); } }