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

Requesting many items with a non-existent id throws KeyNotFoundException #65

Closed
Archomeda opened this issue Jun 18, 2020 · 0 comments · Fixed by #66
Closed

Requesting many items with a non-existent id throws KeyNotFoundException #65

Archomeda opened this issue Jun 18, 2020 · 0 comments · Fixed by #66
Labels
Area: Web cache Related to the web API caching Duration: Short Less than 2 hours of estimated work Priority: High High priority Resolution: Fixed The issue has been fixed Type: Bug Something isn't working

Comments

@Archomeda
Copy link
Owner

Archomeda commented Jun 18, 2020

For example, running the following code:

using var client = new Gw2Client();
await client.WebApi.V2.Specializations.ManyAsync(new[] { -1, 1 });

will throw a KeyNotFoundException from BaseCacheMethod.GetOrUpdateManyAsync.

The cause is that there's at least one id, but not all ids, that's not valid (a.k.a. does not exist on the API).
Gw2Sharp should do the same as the API: ignore invalid ids and return the partial list of items.

@Archomeda Archomeda added Type: Bug Something isn't working Status: In progress This is being worked on Priority: High High priority Duration: Short Less than 2 hours of estimated work Area: Web cache Related to the web API caching labels Jun 18, 2020
@Archomeda Archomeda added Resolution: Fixed The issue has been fixed and removed Status: In progress This is being worked on labels Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Web cache Related to the web API caching Duration: Short Less than 2 hours of estimated work Priority: High High priority Resolution: Fixed The issue has been fixed Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant