Skip to content

Commit

Permalink
Add the url in the error object, fixes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Jun 27, 2022
1 parent 468f965 commit 4093bba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/index.js
Expand Up @@ -40,7 +40,9 @@ const parseUrl = (url, normalize = false) => {
const GIT_RE = /((git@|http(s)?:\/\/)([\w\.@]+)(\/|:))(([\~,\w,\-,\_,\/]+)(.git){0,1}((\/){0,1}))/

if (typeof url !== "string" || !url.trim()) {
throw new Error("Invalid url.")
const err = new Error("Invalid url.")
err.subject_url = url
throw err
}

if (normalize) {
Expand Down

0 comments on commit 4093bba

Please sign in to comment.