package core.interceptor

import scala.concurrent.Future

trait Interceptor[A, B] {
  def handle(ctx: A): Future[Either[B, Option[A]]]
}
package core.interceptor

import scala.concurrent.Future

trait Interceptor[T] {
  def handle(ctx: T): Future[T]
}
--- 
+++ 
@@ -2,6 +2,6 @@
 
 import scala.concurrent.Future
 
-trait Interceptor[T] {
-  def handle(ctx: T): Future[T]
+trait Interceptor[A, B] {
+  def handle(ctx: A): Future[Either[B, Option[A]]]
 }
Modify the trait interceptor for result
