Bot-Detector-Core-Files
Bot-Detector-Core-Files copied to clipboard
Attempt to Create Prediction if One Doesn't Exist
- Check if prediction exists
- Ask ML repo app to make one via remote request
- If it can't create a prediction (no data on the account or whatever else) return a "blank" prediction so that the plugin doesn't freak out.
Blank prediction format:
predict_dict = {
"player_id": -1,
"player_name": player_name,
"prediction_label": "Prediction not in database",
"prediction_confidence": 0
}
is the issue that we are not handling the "blank" prediction?
Originally. That has been fixed in the legacy routes, but remains an issue in GET /v1/prediction.
ah, nice catch!
the story would be as a user i don't want to see an api error if the user is not in the database