Fixed a bug around cursors and updated nuget packages.#162
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a cursor-parsing failure in APIBase when responses aren’t JSON objects, and bumps the library/package dependencies along with the NuGet package version.
Changes:
- Bump
EVEStandardpackage version from4.0.0to4.0.1. - Update several NuGet dependencies (Logging, JWT, System.Text.Json) to newer versions.
- Fix cursor parsing to only attempt
TryGetProperty("cursor", ...)when the JSON root is an object.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
EVEStandard/EVEStandard.csproj |
Updates package version and upgrades NuGet dependencies. |
EVEStandard/API/APIBase.cs |
Guards cursor parsing to avoid failures when the JSON root isn’t an object. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+337
to
338
| if (document.RootElement.ValueKind == JsonValueKind.Object && document.RootElement.TryGetProperty("cursor", out var cursorElement)) | ||
| { |
There was a problem hiding this comment.
Cursor parsing is now guarded for object roots, but there’s no test coverage validating the original failure mode (a top-level JSON array response). Since many ESI endpoints return arrays, add a test asserting ProcessResponse succeeds and leaves Cursor null when the response body is e.g. "[]" (or "[1,2]").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.