Class ContextReportingParsingErrorHandler$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextReportingParsingErrorHandler$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(StatusCode status, ErrorInfo error, org.apache.pekko.event.LoggingAdapter log, ServerSettings settings) handle(StatusCode status, ErrorInfo error, org.apache.pekko.event.LoggingAdapter log, ServerSettings settings, IllegalRequestContext context) Called by the server for a request that failed to parse, with what is known about that request.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
ContextReportingParsingErrorHandler$
public ContextReportingParsingErrorHandler$()
-
-
Method Details
-
handle
public HttpResponse handle(StatusCode status, ErrorInfo error, org.apache.pekko.event.LoggingAdapter log, ServerSettings settings) - Specified by:
handlein classParsingErrorHandler
-
handle
public HttpResponse handle(StatusCode status, ErrorInfo error, org.apache.pekko.event.LoggingAdapter log, ServerSettings settings, IllegalRequestContext context) Description copied from class:ParsingErrorHandlerCalled by the server for a request that failed to parse, with what is known about that request.The default implementation ignores
contextand delegates to the four-argumenthandle, so existing handlers keep working unchanged; override this method instead to make use of the context. The parameter is still worth passing for a handler that does not read it, because the arguments of this method are visible to anything instrumenting it: the OpenTelemetry Java agent has to name the span it emits for a rejected requestHTTPand report neitherhttp.request.methodnorurl.path, since the four-argument signature describes only the failure and never the request that caused it. See {@link https://github.com/apache/pekko-http/issues/1245}.Note that
DefaultParsingErrorHandlerdeliberately keeps implementing the four-argument method rather than this one, so that advice matching that signature keeps firing.- Overrides:
handlein classParsingErrorHandler- Parameters:
status- (undocumented)error- (undocumented)log- (undocumented)settings- (undocumented)context- (undocumented)- Returns:
- (undocumented)
-