dump PGN in the log when an import fails

This commit is contained in:
Thibault Duplessis 2016-03-25 01:03:14 +07:00
parent 6c0a9e27af
commit 1b3d54eb3f
2 changed files with 3 additions and 2 deletions

View file

@ -31,7 +31,8 @@ object Importer extends LilaController {
} inject Redirect(routes.Round.watcher(game.id, "white"))
} recover {
case e =>
logger.branch("importer").warn("sendGame", e)
logger.branch("importer").warn(
s"Imported game validates but can't be replayed:\n${data.pgn}", e)
Redirect(routes.Importer.importGame)
}
)

View file

@ -67,7 +67,7 @@ object Setup extends LilaController with TheftPrevention {
), {
case config => userId ?? UserRepo.byId flatMap { destUser =>
destUser ?? Challenge.restriction flatMap {
case Some(_) =>
case Some(_) =>
Redirect(routes.Lobby.home + s"?user=${~userId}#friend").fuccess
case None =>
import lila.challenge.Challenge._