Skip to content

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.

@Koenari Koenari merged commit a770aeb into xivapi:master Mar 22, 2025
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