Package akka.http.scaladsl.model
Class ErrorInfo
- java.lang.Object
-
- akka.http.scaladsl.model.ErrorInfo
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
public final class ErrorInfo extends java.lang.Object implements scala.Product, scala.Equals, java.io.Serializable
Two-level model of error information. The summary should explain what is wrong with the request or response *without* directly repeating anything present in the message itself (in order to not open holes for XSS attacks), while the detail can contain additional information from any source (even the request itself).- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorInfo
apply(java.lang.String summary, java.lang.String detail)
INTERNAL APIboolean
canEqual(java.lang.Object that)
ErrorInfo
copy(java.lang.String summary, java.lang.String detail)
INTERNAL APIjava.lang.String
detail()
boolean
equals(java.lang.Object that)
java.lang.String
errorHeaderName()
java.lang.String
format(boolean withDetail)
java.lang.String
formatPretty()
static ErrorInfo
fromCompoundString(java.lang.String message)
Allows constructing anErrorInfo
from a single string.int
productArity()
java.lang.Object
productElement(int n)
java.lang.String
summary()
java.lang.String
toString()
static scala.Option<scala.Tuple2<java.lang.String,java.lang.String>>
unapply(ErrorInfo arg)
ErrorInfo
withErrorHeaderName(java.lang.String headerName)
ErrorInfo
withFallbackSummary(java.lang.String fallbackSummary)
ErrorInfo
withSummary(java.lang.String newSummary)
ErrorInfo
withSummaryPrepended(java.lang.String prefix)
-
-
-
Method Detail
-
apply
public static ErrorInfo apply(java.lang.String summary, java.lang.String detail)
INTERNAL API
-
unapply
public static scala.Option<scala.Tuple2<java.lang.String,java.lang.String>> unapply(ErrorInfo arg)
-
fromCompoundString
public static ErrorInfo fromCompoundString(java.lang.String message)
Allows constructing anErrorInfo
from a single string. Used for example when catching exceptions generated by the header value parser, which doesn't provide summary/details information but structures its exception messages accordingly.- Parameters:
message
- (undocumented)- Returns:
- (undocumented)
-
summary
public java.lang.String summary()
-
detail
public java.lang.String detail()
-
errorHeaderName
public java.lang.String errorHeaderName()
-
withSummary
public ErrorInfo withSummary(java.lang.String newSummary)
-
withSummaryPrepended
public ErrorInfo withSummaryPrepended(java.lang.String prefix)
-
withErrorHeaderName
public ErrorInfo withErrorHeaderName(java.lang.String headerName)
-
withFallbackSummary
public ErrorInfo withFallbackSummary(java.lang.String fallbackSummary)
-
formatPretty
public java.lang.String formatPretty()
-
format
public java.lang.String format(boolean withDetail)
-
copy
public ErrorInfo copy(java.lang.String summary, java.lang.String detail)
INTERNAL API
-
canEqual
public boolean canEqual(java.lang.Object that)
- Specified by:
canEqual
in interfacescala.Equals
-
equals
public boolean equals(java.lang.Object that)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
productElement
public java.lang.Object productElement(int n)
- Specified by:
productElement
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-