Word a disagreeing tagId as a mismatch, and record how a TLV input is keyed
Mirror / push (push) Has been cancelled
Test / test (18) (pull_request) Successful in 31s
Test / lint (pull_request) Successful in 22s
Test / test (20) (pull_request) Successful in 30s
Test / test (24) (pull_request) Successful in 30s
Test / test (26) (pull_request) Successful in 30s
Test / test (22) (pull_request) Successful in 37s
Mirror / push (push) Has been cancelled
Test / test (18) (pull_request) Successful in 31s
Test / lint (pull_request) Successful in 22s
Test / test (20) (pull_request) Successful in 30s
Test / test (24) (pull_request) Successful in 30s
Test / test (26) (pull_request) Successful in 30s
Test / test (22) (pull_request) Successful in 37s
This commit is contained in:
+1
-1
@@ -167,7 +167,7 @@ function entryOf(name: string, input: unknown): Result<{ tagId: number; tagValue
|
||||
if (keyed.err) return { err: keyed.err };
|
||||
|
||||
if ('tagId' in input && input.tagId !== undefined && input.tagId !== keyed.tagId) {
|
||||
return { err: new Error(`TLV "${name}": its tagId is not ${String(keyed.tagId)}, the tag its key names; drop the tagId`) };
|
||||
return { err: new Error(`TLV "${name}": its tagId does not match ${String(keyed.tagId)}, the tag its key names; drop the tagId`) };
|
||||
}
|
||||
|
||||
return { tagId: keyed.tagId, tagValue: input.tagValue };
|
||||
|
||||
Reference in New Issue
Block a user