Skip to content

Commit ed9ce6f

Browse files
committed
better error handling
1 parent 881aff4 commit ed9ce6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ try{
3535
makeSureFoldersAreCreated(file);
3636
fs.writeFileSync(file, JSON.stringify(data, null, 2));
3737
console.log(`successfully saved data from ${url} to ${file}`);
38-
});
38+
})
39+
.catch(error => core.setFailed(error.message));
3940
}catch(error){
4041
core.setFailed(error.message);
4142
}

0 commit comments

Comments
 (0)