Skip to content

Commit

Permalink
Set 5000 ms timeout for YT calls, trace errors
Browse files Browse the repository at this point in the history
  • Loading branch information
burkov committed Feb 12, 2020
1 parent b041267 commit 5e0844f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const main = async () => {
summary,
},
} = await axios.get(`https://youtrack.jetbrains.com/api/issues/${id}`, {
timeout: 5000,
headers: {
Authorization: `Bearer ${accessToken}`,
},
Expand All @@ -130,7 +131,8 @@ const main = async () => {
if (program.noSort) console.log(formatted);
else result.push({ state, resolved, formatted });
} catch (e) {

ora.fail(`Failed to fetch issue ${id} data: ${e.message}`);
ora.start(`Resuming...`);
}
}

Expand Down

0 comments on commit 5e0844f

Please sign in to comment.