Class DuplicateException

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

@ResponseStatus(CONFLICT) public class DuplicateException extends RuntimeException
Exception thrown when a duplicate resource or entity is encountered.

This exception is annotated with ResponseStatus to automatically return an HTTP 409 (Conflict) status code when thrown in a Spring web application.

See Also:
  • Constructor Details

    • DuplicateException

      public DuplicateException(String message)
      Constructs a new DuplicateException with the specified detail message.
      Parameters:
      message - the detail message that explains the reason for the exception