Closed MrMJLee closed 8 years ago
Somehow it worked for one time. Accidentally modified the trap number 1 in Manawatu Tawa loop line. Sorry Sam haha
I really need to work out which 500 errors are SQLExceptions caused by constraint violations at some point, and repackage them as 400 bad requests which they are.
So is this an API bug or just a one-off client-side usage error? I can check the tomcat logs when I get home if you want, just let me know.
It worked just for that trap. Same request now doesn't work for other traps in other traplines. Only the Tawa loop works at the moment
I will close this issue as @samhunt0 fixed this from API
Having same issue.
Please check the tomcat log and post details if this is urgent. Alternatively I'll be home in 1-2 hours and we can debug it then. I seriously doubt that this is the same bug as the fix for this is on master and updated on EC2.
Okay I've scanned the last 35 requests made to the API. While there are 5 failed responses with 500 https codes, there is no evidence of any bugs in the API. These are all mislabeled 400 bad requests as was discussed earlier. Please review the following summaries:
As for the first error, I think I'll add a not-null constraint to the default traptype and bait fields on trapline. Its not a perfect solution, but it will do.
As for the seconds error, Review issue #156. Please implement the web-app UI restriction so users cannot enter invalid coordinate values As this has already been implemented in the API, the database no longer accepts invalid latitude or longitude values.
Closing as remaining errors should actually 400 not 500 as noted. This will be continued under issue #176.
Editing a trap returns a 500 internal server error. Maybe on web side problem.