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.SerializableTwo-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 ErrorInfoapply(java.lang.String summary, java.lang.String detail)INTERNAL APIbooleancanEqual(java.lang.Object that)ErrorInfocopy(java.lang.String summary, java.lang.String detail)INTERNAL APIjava.lang.Stringdetail()booleanequals(java.lang.Object that)java.lang.StringerrorHeaderName()java.lang.Stringformat(boolean withDetail)java.lang.StringformatPretty()static ErrorInfofromCompoundString(java.lang.String message)Allows constructing anErrorInfofrom a single string.intproductArity()java.lang.ObjectproductElement(int n)java.lang.Stringsummary()java.lang.StringtoString()static scala.Option<scala.Tuple2<java.lang.String,java.lang.String>>unapply(ErrorInfo arg)ErrorInfowithErrorHeaderName(java.lang.String headerName)ErrorInfowithFallbackSummary(java.lang.String fallbackSummary)ErrorInfowithSummary(java.lang.String newSummary)ErrorInfowithSummaryPrepended(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 anErrorInfofrom 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:
canEqualin interfacescala.Equals
-
equals
public boolean equals(java.lang.Object that)
- Specified by:
equalsin interfacescala.Equals- Overrides:
equalsin classjava.lang.Object
-
productElement
public java.lang.Object productElement(int n)
- Specified by:
productElementin interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArityin interfacescala.Product
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-