Akka HTTP configuration details exposed to client on EntityStreamSizeException
#1015 opened on Apr 6, 2017
Description
Hi,
The current implementation of the EntityStreamSizeException handling exposes a detailed message about which Akka settings to use (to allow bigger contents in requests) to the client, even though verbose-error-messages is set to off.
I changed the Class to extend ExceptionWithErrorInfo to distinguish between a summary and a detailed message.
There is a check for the verbosity setting in HttpServerBluePrint:459 but it seems like it is never called and the ErrorInfo.formatPretty result is returned to the client (which may also just be the result of RuntimeException.getMessage as ExceptionWithErrorInfo extends RuntimeException).
Do you have an idea why or what to change to only display the summary in that case? The mentioned classes are in the akka-http-core module.
You can trigger it by setting akka.http.server.parsing.max-content-length to 1 and send some data with your request.
I pushed my current changes to https://github.com/makubi/akka-http/commit/546af4fa4ac4c5c7e78df2c8b3ba083aa64b3c2e.
Thanks in advance.