Skip to content

Commit

Permalink
fix(partial-json): don't error on unknown tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie authored and stainless-app[bot] committed Jun 28, 2024
1 parent c0cf3c1 commit 75e6dd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/_vendor/partial-json-parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ const tokenize = (input: string) => {
value,
});
} else {
throw new Error(`Invalid token: ${value} is not a valid token!`);
// unknown token, e.g. `nul` which isn't quite `null`
current++;
continue;
}
continue;
}
Expand Down

0 comments on commit 75e6dd9

Please sign in to comment.