Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Zhou committed Apr 8, 2024
1 parent 7fa22b2 commit dc41a93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion versioner.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ async function findOnCodeartifactByPrefix(domainName, format, packageName, repos
}
nextToken = listVersionsResp.nextToken;
} catch (e) {
// Temporary solution to catch if the package does not yet exist on code artifact.
if (e.code === "ResourceNotFoundException") {
/**
* In the case the package cannot be found on code artifact, we return a null.
* This may happen because the package is not yet created in code artifact.
*/
return null
} else {
throw e
Expand Down

0 comments on commit dc41a93

Please sign in to comment.