Class ApiErrorResponse

java.lang.Object
com.samupert.univpm.eurostat.common.ApiErrorResponse

public final class ApiErrorResponse extends Object
Class that represent an API error response.
  • Constructor Details

    • ApiErrorResponse

      public ApiErrorResponse(org.springframework.http.HttpStatus status, String error)
      Creates a new API error response.
      Parameters:
      status - The HTTP status code.
      error - The error message.
  • Method Details

    • timestamp

      public LocalDateTime timestamp()
      Gets the timestamp of the error.
      Returns:
      Returns the timestamp of the error.
    • status

      public org.springframework.http.HttpStatus status()
      Gets the Http status code. See HttpStatus.
      Returns:
      Returns the HTTP status code.
    • error

      public String error()
      Gets the error message.
      Returns:
      Returns the error message.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object