Record Class ErrorResponse

java.lang.Object
java.lang.Record
com.mojang.authlib.yggdrasil.response.ErrorResponse

public record ErrorResponse(String path, @Nullable String error, @Nullable String errorMessage, @Nullable Map<String,Object> details) extends Record
Error entity returned by all Minecraft.net services (As well as Yggdrasil services)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Map<String,Object>
    The field for the details record component.
    private final String
    The field for the error record component.
    private final String
    The field for the errorMessage record component.
    private final String
    The field for the path record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ErrorResponse(String path, String error, String errorMessage, Map<String,Object> details)
    Creates an instance of a ErrorResponse record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the details record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the error record component.
    Returns the value of the errorMessage record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the path record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • path

      @SerializedName("path") private final String path
      The field for the path record component.
    • error

      @SerializedName("error") @Nullable private final String error
      The field for the error record component.
    • errorMessage

      @SerializedName("errorMessage") @Nullable private final String errorMessage
      The field for the errorMessage record component.
    • details

      @SerializedName("details") @Nullable private final Map<String,Object> details
      The field for the details record component.
  • Constructor Details

    • ErrorResponse

      public ErrorResponse(String path, @Nullable String error, @Nullable String errorMessage, @Nullable Map<String,Object> details)
      Creates an instance of a ErrorResponse record class.
      Parameters:
      path - the value for the path record component
      error - the value for the error record component
      errorMessage - the value for the errorMessage record component
      details - the value for the details record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • path

      @SerializedName("path") public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • error

      @SerializedName("error") @Nullable public String error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component
    • errorMessage

      @SerializedName("errorMessage") @Nullable public String errorMessage()
      Returns the value of the errorMessage record component.
      Returns:
      the value of the errorMessage record component
    • details

      @SerializedName("details") @Nullable public Map<String,Object> details()
      Returns the value of the details record component.
      Returns:
      the value of the details record component