Class ErrorResponse
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- pl.gsmservice.gateway.models.errors.async.ErrorResponse
-
- All Implemented Interfaces:
java.io.Serializable
public class ErrorResponse extends java.lang.RuntimeExceptionErrorResponseAn object that complies with RFC 9457 containing information about a request error
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classErrorResponse.Builder
-
Constructor Summary
Constructors Constructor Description ErrorResponse()ErrorResponse(java.util.Optional<java.lang.String> type, java.util.Optional<java.lang.Long> status, java.util.Optional<java.lang.String> title, java.util.Optional<java.lang.String> detail, java.util.Optional<java.lang.String> code, java.util.Optional<java.lang.String> instance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorResponse.Builderbuilder()java.util.Optional<java.lang.String>code()An API specific error code aiding the provider team understand the error based on their own potential taxonomy or registryjava.util.Optional<java.lang.String>detail()A human-readable explanation specific to this occurrence of the problembooleanequals(java.lang.Object o)inthashCode()java.util.Optional<java.lang.String>instance()A URI reference that identifies the specific occurrence of the problemjava.util.Optional<java.lang.Long>status()The HTTP status code generated by the origin server for this occurrence of the problemjava.util.Optional<java.lang.String>title()A short, human-readable summary of the problem typejava.lang.StringtoString()java.util.Optional<java.lang.String>type()A URI reference that identifies the problem typeErrorResponsewithCode(java.lang.String code)An API specific error code aiding the provider team understand the error based on their own potential taxonomy or registryErrorResponsewithCode(java.util.Optional<java.lang.String> code)An API specific error code aiding the provider team understand the error based on their own potential taxonomy or registryErrorResponsewithDetail(java.lang.String detail)A human-readable explanation specific to this occurrence of the problemErrorResponsewithDetail(java.util.Optional<java.lang.String> detail)A human-readable explanation specific to this occurrence of the problemErrorResponsewithInstance(java.lang.String instance)A URI reference that identifies the specific occurrence of the problemErrorResponsewithInstance(java.util.Optional<java.lang.String> instance)A URI reference that identifies the specific occurrence of the problemErrorResponsewithStatus(long status)The HTTP status code generated by the origin server for this occurrence of the problemErrorResponsewithStatus(java.util.Optional<java.lang.Long> status)The HTTP status code generated by the origin server for this occurrence of the problemErrorResponsewithTitle(java.lang.String title)A short, human-readable summary of the problem typeErrorResponsewithTitle(java.util.Optional<java.lang.String> title)A short, human-readable summary of the problem typeErrorResponsewithType(java.lang.String type)A URI reference that identifies the problem typeErrorResponsewithType(java.util.Optional<java.lang.String> type)A URI reference that identifies the problem type
-
-
-
Constructor Detail
-
ErrorResponse
public ErrorResponse(java.util.Optional<java.lang.String> type, java.util.Optional<java.lang.Long> status, java.util.Optional<java.lang.String> title, java.util.Optional<java.lang.String> detail, java.util.Optional<java.lang.String> code, java.util.Optional<java.lang.String> instance)
-
ErrorResponse
public ErrorResponse()
-
-
Method Detail
-
type
public java.util.Optional<java.lang.String> type()
A URI reference that identifies the problem type
-
status
public java.util.Optional<java.lang.Long> status()
The HTTP status code generated by the origin server for this occurrence of the problem
-
title
public java.util.Optional<java.lang.String> title()
A short, human-readable summary of the problem type
-
detail
public java.util.Optional<java.lang.String> detail()
A human-readable explanation specific to this occurrence of the problem
-
code
public java.util.Optional<java.lang.String> code()
An API specific error code aiding the provider team understand the error based on their own potential taxonomy or registry
-
instance
public java.util.Optional<java.lang.String> instance()
A URI reference that identifies the specific occurrence of the problem
-
builder
public static ErrorResponse.Builder builder()
-
withType
public ErrorResponse withType(java.lang.String type)
A URI reference that identifies the problem type
-
withType
public ErrorResponse withType(java.util.Optional<java.lang.String> type)
A URI reference that identifies the problem type
-
withStatus
public ErrorResponse withStatus(long status)
The HTTP status code generated by the origin server for this occurrence of the problem
-
withStatus
public ErrorResponse withStatus(java.util.Optional<java.lang.Long> status)
The HTTP status code generated by the origin server for this occurrence of the problem
-
withTitle
public ErrorResponse withTitle(java.lang.String title)
A short, human-readable summary of the problem type
-
withTitle
public ErrorResponse withTitle(java.util.Optional<java.lang.String> title)
A short, human-readable summary of the problem type
-
withDetail
public ErrorResponse withDetail(java.lang.String detail)
A human-readable explanation specific to this occurrence of the problem
-
withDetail
public ErrorResponse withDetail(java.util.Optional<java.lang.String> detail)
A human-readable explanation specific to this occurrence of the problem
-
withCode
public ErrorResponse withCode(java.lang.String code)
An API specific error code aiding the provider team understand the error based on their own potential taxonomy or registry
-
withCode
public ErrorResponse withCode(java.util.Optional<java.lang.String> code)
An API specific error code aiding the provider team understand the error based on their own potential taxonomy or registry
-
withInstance
public ErrorResponse withInstance(java.lang.String instance)
A URI reference that identifies the specific occurrence of the problem
-
withInstance
public ErrorResponse withInstance(java.util.Optional<java.lang.String> instance)
A URI reference that identifies the specific occurrence of the problem
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
-