akka/akka-http

Allow customize response that is generated in akka http when a request timeout is exceed

Open

#378 opened on Oct 8, 2016

View on GitHub
 (6 comments) (1 reaction) (0 assignees)Scala (598 forks)batch import
1 - triagedhelp wantedt:docs

Repository metrics

Stars
 (1,311 stars)
PR merge metrics
 (Avg merge 1d 10h) (2 merged PRs in 30d)

Description

Issue by matheuslima Saturday Oct 08, 2016 at 16:27 GMT Originally opened as https://github.com/akka/akka/issues/21638


Today, the response generated looks like:

    HttpResponse(StatusCodes.ServiceUnavailable, entity = "The server was not able " +
      "to produce a timely response to your request.\r\nPlease try again in a short while!")

I need add some headers to all responses generated from my server, but the directive respondWithHeaders seems not work with timed out responses, due the fact the default response is injected by akka http server.

Contributor guide