Repository navigation
Conversation
Collaborator
|
Thanks for catching this, the orphaned block was easy to miss. We've recreated the fix in our internal monorepo in ProjectOpenSea/opensea-devtools#789 (now merged), with you credited on the commit, and it will ship in the next SDK release. This repo is a read-only mirror, so we can't merge PRs here, but we review every one. Appreciate it! |
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.
What
_createRateLimitErrorhad no documentation. Its JSDoc block had ended uporphaned directly above
_createApiError, separated from it by nothing but ablank line.
Why it's a bug
Two adjacent JSDoc blocks: TypeScript, IDEs and typedoc attach only the last
one to a symbol. So the first block was dead text in the source — it describes
_createRateLimitErrorwhile sitting above a method it says nothing about — and_createRateLimitErrorwas left with no documentation at all.That method builds the
OpenSeaRateLimitErrorthatexecuteWithRateLimitinsrc/utils/rateLimit.tsreads to decide whether a 429/599 is retryable, so itsdocumented contract (
statusCode,retryAfter,responseBody) is exactly whata reader needs and cannot find.
Most likely fallout of 59b7337 ("Attach
statusCodeto every error thrown for anon-OK API response"), which added
_createApiErrorwith a new block withoutremoving the old one.
Fix
Move the orphaned block back onto the method it describes. Comment-only — no
behavior change.