Skip to content

Commit

Permalink
Add logging to failed claim conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
oschrenk committed May 31, 2020
1 parent a9797f3 commit 4373dab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/lp/web/WebUserFlow.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import play.api.libs.json.{JsError, JsSuccess, Json}
import scala.concurrent.duration._

object WebUserFlow {

private val logger = com.typesafe.scalalogging.Logger(this.getClass)

implicit private val timeout: Timeout = 3.seconds
private val DefaultBufferSize = 10

Expand All @@ -37,7 +40,8 @@ object WebUserFlow {
case JsSuccess(value, _) =>
value
case JsError(errors) =>
// TODO what do on errors?
logger.warn(s"Claim validation failed $errors")
// TODO inform user of failure
}
// ignore other messages but drain content to avoid stream being clogged
case bm: BinaryMessage => bm.dataStream.runWith(Sink.ignore)
Expand Down

0 comments on commit 4373dab

Please sign in to comment.