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

Do not silently swallow exceptions while parsing #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tawmy
Copy link
Contributor

@Tawmy Tawmy commented Mar 9, 2025

Hey there,

this is a tiny PR to remove ambiguity during parsing. Right now, it's impossible to know whether parsing failed or a character/fc/etc was not found. If the entity was not found, the method returns null. However, the method also returns null if certain exceptions were thrown.

I believe there is no reason to swallow exceptions at this point and it would be better practice to throw them instead. It's up to the user to handle the exceptions appropriately. This makes errors more transparent when using the parser, and removes the ambiguity between entity not found / parsing failed. It also allows setup of resilience pipelines to retry parsing in case of network/rate limit issues.

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.

1 participant