-
Notifications
You must be signed in to change notification settings - Fork 423
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
check for nil response data in numia tokens endpoint #3847
Conversation
Warning Rate limit exceeded@jonator has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 4 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes in this pull request involve enhancements to error handling and data structure flexibility within the codebase. The Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/server/src/queries/complex/assets/market.ts (1 hunks)
- packages/server/src/queries/complex/assets/price/providers/sidecar.ts (4 hunks)
- packages/server/src/queries/data-services/token-data.ts (1 hunks)
Additional comments not posted (3)
packages/server/src/queries/complex/assets/price/providers/sidecar.ts (2)
3-3
: LGTM!The addition of the
isNil
import from@osmosis-labs/utils
is a valid change. It will likely be used to handlenull
orundefined
values in the modified code.
Line range hint
34-49
: Improved error handling for nil price values.The added check using
isNil
to determine if the price variablep
isnull
orundefined
enhances the error handling in thegetBatchLoader
function. Throwing an error whenp
isnil
prevents potential downstream issues when processing prices and provides a clear indication of the specificbaseCoinMinimalDenom
and USDC pair for which the price result is missing.This change improves the robustness and maintainability of the price querying process.
packages/server/src/queries/complex/assets/market.ts (1)
234-234
: Improved handling of null or undefined liquidity values.The change to use the nullish coalescing operator (
??
) is a good improvement. It ensures that iftokenData.liquidity
isnull
orundefined
, it defaults to0
. This prevents potential errors related to undefined values and guarantees thatliquidity
is always a valid number.
What is the purpose of the change:
Linear Task
It seems recently, Numia has started to return null (vs
0
) forvolume24h
andliquidity
for some tokens in the/tokens/v2/all
endpoint. This PR handles that gracefully.Removes old token query store to remove footgun.
Brief Changelog
Testing and Verifying