mirror of https://github.com/grpc/grpc-node.git
grpc-js-core: add missing space in error message
This commit adds a missing space to an error message and updates a test to prevent regressions.
This commit is contained in:
parent
797bcbaffe
commit
b64ed1c18e
|
@ -43,7 +43,7 @@ function normalizeKey(key: string): string {
|
|||
|
||||
function validate(key: string, value?: MetadataValue): void {
|
||||
if (!isLegalKey(key)) {
|
||||
throw new Error('Metadata key"' + key + '" contains illegal characters');
|
||||
throw new Error('Metadata key "' + key + '" contains illegal characters');
|
||||
}
|
||||
if (value != null) {
|
||||
if (isBinaryKey(key)) {
|
||||
|
|
|
@ -52,7 +52,7 @@ describe('Metadata', () => {
|
|||
});
|
||||
assert.throws(() => {
|
||||
metadata.set('key$', 'value');
|
||||
});
|
||||
}, /Error: Metadata key "key\$" contains illegal characters/);
|
||||
assert.throws(() => {
|
||||
metadata.set('', 'value');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue