You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
686 B

package controllers.common
import com.alexitc.playsonify.models.ServerError
import com.alexitc.playsonify.play.AbstractJsonController
import org.slf4j.LoggerFactory
abstract class MyJsonController(cc: MyJsonControllerComponents) extends AbstractJsonController[Nothing](cc) {
protected val logger = LoggerFactory.getLogger(this.getClass)
override protected def onServerError(error: ServerError): Unit = {
error.cause match {
case Some(cause) =>
logger.error(s"Unexpected internal error, id = ${error.id.string}, error = $error", cause)
case None =>
logger.error(s"Unexpected internal error, id = ${error.id.string}, error = $error}")
}
}
}