Improve error categorizations
This commit is contained in:
parent
db40ac46b9
commit
1d367b0bec
24 changed files with 47 additions and 38 deletions
3
lib/repository.js
generated
3
lib/repository.js
generated
|
|
@ -1,10 +1,11 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseRepositoryNwo = void 0;
|
||||
const util_1 = require("./util");
|
||||
function parseRepositoryNwo(input) {
|
||||
const parts = input.split("/");
|
||||
if (parts.length !== 2) {
|
||||
throw new Error(`"${input}" is not a valid repository name`);
|
||||
throw new util_1.UserError(`"${input}" is not a valid repository name`);
|
||||
}
|
||||
return {
|
||||
owner: parts[0],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue