Class NotValidException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.glowmart.shop_management.exception.NotValidException
All Implemented Interfaces:
Serializable

@ResponseStatus(BAD_REQUEST) public class NotValidException extends RuntimeException
Exception thrown when a provided input value is not valid.

This exception is annotated with ResponseStatus to automatically return an HTTP 400 (Bad Request) status code when thrown in a Spring web application. It is typically used to indicate invalid request parameters or data that fails validation.

See Also:
  • Constructor Details

    • NotValidException

      public NotValidException(String message)
      Constructs a new NotValidException with the specified detail message.
      Parameters:
      message - the detail message that explains why the input is invalid