Class WPRequestException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.ygbstudio.powerwp4j.exceptions.WPRequestException
All Implemented Interfaces:
Serializable

public class WPRequestException extends RuntimeException
Thrown when a request to the WordPress REST API fails or returns an error response.

This exception indicates that the WordPress site could not be reached, returned an error HTTP status, or responded with an unexpected body.

Since:
0.1.0
See Also:
  • Constructor Details

    • WPRequestException

      public WPRequestException(String message)
      Constructs a new WPRequestException with the specified detail message.
      Parameters:
      message - the detail message explaining the reason of the failure.
    • WPRequestException

      public WPRequestException(String message, Throwable cause)
      Constructs a new WPRequestException with the specified detail message and cause.
      Parameters:
      message - the detail message explaining the reason of the failure
      cause - the cause of the failure, may be null