Open stewSquared opened 6 years ago
So, our rejection handler needs to handleNotFound
if we want this to 404 by default.
We should fix this pretty soon, since a few services have started using rejectEmptyResponse
, and said rejection ends up manifesting as a CORS issue.
cc @zachdriver @vuspenskiy @jodersky
For future reference, we should add customization like this in terms of akka-http directives rather than as extension methods on OptionT
I believe it actually is responding with a 404 when using rejectEmptyResponse
. The problem is that it's not adding the CORS headers we need, because we're not handling that rejection
See: https://doc.akka.io/docs/akka-http/10.0.10/scala/http/routing-dsl/directives/misc-directives/rejectEmptyResponse.html#rejectemptyresponse