axel3rd / mpg-coach-bot

MPG (Mon Petit Gazon) coach bot, to automate and optimize weekly actions
https://axel3rd.github.io/mpg-coach-bot/
MIT License
23 stars 8 forks source link

Crash due to PUT content response update #205

Closed axel3rd closed 2 years ago

axel3rd commented 2 years ago

Stack:

Exception in thread "main" java.lang.UnsupportedOperationException: The team has not been updated, result message: {"id":"mpg_match_team_formation_NL931FU9_1_1_6_3_4","type":"mpg_match_team_formation","composition":"343","playersOnPitch":{"1":"mpg_championship_player_138039","2":"mpg_championship_player_219717","3":"mpg_championship_player_170116","4":"mpg_championship_player_472148","5":"mpg_championship_player_61256","6":"mpg_championship_player_111232","7":"mpg_championship_player_51952","8":null,"9":"mpg_championship_player_40270","10":"mpg_championship_player_61597","11":"mpg_championship_player_61316","12":"mpg_championship_player_220325","13":null,"14":null,"15":null,"16":null,"17":null,"18":"mpg_championship_player_175204"},"tacticalSubs":[{"rating":5,"subId":"mpg_championship_player_220325","starterId":"mpg_championship_player_472148"}],"captain":"mpg_championship_player_61256"}
        at org.blondin.mpg.root.MpgClient.updateCoach(MpgClient.java:126)
        at org.blondin.mpg.Main.updateTeamWithRetry(Main.java:282)
        at org.blondin.mpg.Main.processGames(Main.java:194)
        at org.blondin.mpg.Main.processLeague(Main.java:114)
        at org.blondin.mpg.Main.process(Main.java:82)
        at org.blondin.mpg.Main.main(Main.java:71)

"null" is perhaps not the good value when no player at some position.

axel3rd commented 2 years ago

The response seems have changed (before {"success":true})

axel3rd commented 2 years ago

Fixed in mpg-coach-bot-1.8.1-20211005.174015-1.jar. Waiting a little before release, to verify if there are no other major changes on API during the week.