Class InvalidRequestException

All Implemented Interfaces:
Serializable

public class InvalidRequestException extends APIException
Exception thrown for invalid request errors including validation failures.

This exception is thrown when the API returns an error with type: "invalid_request"

Example usage:


 try {
     // API call
 } catch (InvalidRequestException e) {
     System.out.println("Error code: " + e.getApiErrorCodeRaw());
     System.out.println("Message: " + e.getMessage());
     System.out.println("Params: " + e.getParams());
     System.out.println("Request URL: " + e.getRequest().getUrl());
 }
 
See Also:
  • Constructor Details

  • Method Details

    • getExpectedErrorType

      public static String getExpectedErrorType()
      Get the error type value that this exception represents.
      Returns:
      the error type string "invalid_request"