Skip to content

Commit

Permalink
add header name in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmelo Patti authored and JakeChampion committed Dec 15, 2020
1 parent 75d9455 commit b72f02a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function normalizeName(name) {
name = String(name)
}
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
throw new TypeError('Invalid character in header field name')
throw new TypeError('Invalid character in header field name: ' + name)
}
return name.toLowerCase()
}
Expand Down

0 comments on commit b72f02a

Please sign in to comment.