All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.finatra.http.internal.exceptions.HttpResponseExceptionMapper.scala Maven / Gradle / Ivy

package com.twitter.finatra.http.internal.exceptions

import com.twitter.finagle.http.{Request, Response}
import com.twitter.finatra.http.exceptions.HttpResponseException
import com.twitter.finatra.http.response.ResponseBuilder
import javax.inject.{Inject, Singleton}

@Singleton
private[http] class HttpResponseExceptionMapper @Inject() (response: ResponseBuilder)
    extends AbstractFrameworkExceptionMapper[HttpResponseException](response) {

  override protected def handle(
    request: Request,
    response: ResponseBuilder,
    exception: HttpResponseException
  ): Response = {
    response.create(exception.response)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy