Skip to content

Conversation

uuf6429
Copy link

@uuf6429 uuf6429 commented Jun 19, 2025

Description

Error messages were showing up like so:

Error: Internal error: .

This is because of a problem with handling strings in the custom interpolation function.

How Has This Been Tested?

Tested it manually, that after the change the original error showed up correctly.


PS: This is a rather critical bug IMO - it's decreasing the quality/trustworthiness of the project.

@@ -286,6 +286,8 @@ export function messageError<Kind extends ErrorKinds>(
valueString = value.message;
} else if (typeof value !== "string") {
valueString = JSON.stringify(value);
} else {
valueString = value;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essentially, none of the cases above actually handled string, with the last else-if cases handling "everything else than strings".

@inferrinizzard
Copy link
Contributor

@uuf6429 Can you give an example of a reproduction and the resulting error messages before and after ?

@uuf6429
Copy link
Author

uuf6429 commented Jun 20, 2025

@inferrinizzard simply call panic("test"); from anywhere, it will show the following in the console: Error: Internal error: . With my fix it would be Error: Internal error: test.

PS: I'm guessing this stuff is not tested, otherwise the original problem would have been long caught. I also don't know how/where to test it, the project is pretty big and the test code somewhat messy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants