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

/monitoring/contract/NaN/alerts: invalid literal for int() with base 10: 'NaN' #124

Open
0x0elliot opened this issue Nov 8, 2023 · 6 comments

Comments

@0x0elliot
Copy link
Contributor

0x0elliot commented Nov 8, 2023

backend_app_thirdeye | Not Found: /monitoring/contract/NaN/alerts
backend_app_thirdeye | INFO: 172.28.0.1:33534 - "GET /monitoring/contract/NaN/alerts HTTP/1.1" 404 Not Found
backend_app_thirdeye | INFO: 172.28.0.1:33498 - "GET /organizations/my HTTP/1.1" 200 OK
backend_app_thirdeye | INFO: 172.28.0.1:33524 - "GET /authentication/me HTTP/1.1" 200 OK
backend_app_thirdeye | INFO: 172.28.0.1:33560 - "GET /smartcontract/get_abi?smart_contract=1 HTTP/1.1" 204 No Content
backend_app_thirdeye | Internal Server Error: /smartcontract/get_abi
backend_app_thirdeye | Traceback (most recent call last):
backend_app_thirdeye | File "/usr/local/lib/python3.9/site-packages/django/db/models/fields/init.py", line 1823, in get_prep_value
backend_app_thirdeye | return int(value)
backend_app_thirdeye | ValueError: invalid literal for int() with base 10: 'NaN'
backend_app_thirdeye |
backend_app_thirdeye | The abov

I see a lot of:
backend_app_thirdeye | INFO: 172.28.0.1:33520 - "GET /smartcontract/my/undefined HTTP/1.1" 500 Internal Server Error

why are these API calls here? this is weird.

@0x0elliot
Copy link
Contributor Author

@SyedAhkam input? why is the frontend calling this?

@0x0elliot
Copy link
Contributor Author

0x0elliot commented Nov 8, 2023

can we please do some sort of filtering where undefined values are not being sent from the frontend? this clutters up a lot of these errors.

@0x0elliot
Copy link
Contributor Author

Screenshot 2023-11-08 at 12 25 28 PM

this is why the cluttering happens.

@SyedAhkam
Copy link
Member

SyedAhkam commented Nov 8, 2023

this has to do with reactivity on the frontend. some specific values take a while to load, leaving the default value as undefined or NaN until the next reactive pass happens whenever the value changes for the variable.

The solution to this is to implement pre-conditions in specific service files.

@0x0elliot
Copy link
Contributor Author

mind mentioning the files so that i can redirect @PlasmicZ to them?

@SyedAhkam
Copy link
Member

everything inside frontend/src/services

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

No branches or pull requests

2 participants