-
Notifications
You must be signed in to change notification settings - Fork 1
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
422 Errors #3
Comments
Thanks so much for this! I had started to switch the parameter from |
I'm seeing 422 errors sporadically too. i tried shortly after and got 200, then tried shortly after and got a 429 |
@tavdog Hrm. There are a few cases where the code throws a |
here is the result. seems my script is attempting to send the same packet so it makes sense it's refusing
|
@tavdog CWOP reports are required to be as close to realtime as possible. The CWOP system assumes that the reading is "right now". Because of that, cwop.rest rejects readings that were taken more than 5 minutes past current time.
|
ok, smart coding on your part. |
I noticed that when sending up a POST request, I would always get a 422 error.
It looks like the culprit was some incorrectly named params. I pushed up a fixed in a fork
After addressing this issue, I noticed I was getting other 422 errors when I would send up data that had '0.0' for some of the value(s) (e.g. windspeedmph). I would think it is considered valid to have 0 windspeed, so I pushed up another commit (justinhorner@0d7b97b) that checks for null, to ensure the API will accept (valid) 0 values.
I just thought I would share my findings, in case you wanted to merge in the changes to your branch (if not, please feel free to close this 'issue'). I ended up forking, fixing and deploying to my own worker.
Thanks for all the work, this is a great solution for (more easily) pushing up data to CWOP
The text was updated successfully, but these errors were encountered: