Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the content when unsupported token error throws on composer.compose() #367

Closed
msivasubramaniaan opened this issue Mar 10, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@msivasubramaniaan
Copy link

Is your feature request related to a problem? Please describe.
As we need to fix the redhat-developer/yaml-language-server#654 issue on our side, but unable to get the content what causes this error.

Describe the solution you'd like
It would be great if you log the content on your side which cause this error.

@msivasubramaniaan msivasubramaniaan added the enhancement New feature or request label Mar 10, 2022
@eemeli
Copy link
Owner

eemeli commented Mar 11, 2022

Would you have some example of the input that's causing this issue? The tracking and logging for this should already be in place.

@msivasubramaniaan
Copy link
Author

we don't have the exact input which causes the issue as YAML having sensitive user information. So we does not log the same.

@eemeli
Copy link
Owner

eemeli commented Mar 21, 2022

The upstream error is being thrown here:

default:
console.log(token)
throw new Error(`Unsupporten token type: ${(token as any).type}`)

It's probably caused by invalid input YAML, but it really shouldn't throw even then. If you have access to the console logs from around the error, that could reveal a bit more information?

I'll stop the error from throwing, but I would be really rather interested in getting a sample input that's causing this, as I can't even figure out how to test this.

@eemeli
Copy link
Owner

eemeli commented Apr 6, 2022

Closing as presumably resolved.

@eemeli eemeli closed this as completed Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants