Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Show the missing token scope error #62

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/create-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ export interface CreateTasksOptions {
export default async (options: CreateTasksOptions) => {
log.info("Creating tasks...");

const branches = await listBranches(options.branchName);
const branchId = branches.data[0].data.id;
const tasks = await listTasks({ branchId });
let branches, branchId, tasks;
try {
branches = await listBranches(options.branchName);
branchId = branches.data[0].data.id;
tasks = await listTasks({ branchId });
} catch (error) {
log.error(JSON.stringify(error));
throw error;
}

await Promise.allSettled(
tasks.data
Expand Down
Loading