View Javadoc
1   package de.dlr.shepard.common.exceptions;
2   
3   import jakarta.ws.rs.core.Response.Status;
4   import java.io.Serial;
5   
6   /**
7    * InvalidRequestException implements an exception. This exception should be
8    * thrown if a required value in the Request doesn't fulfill the necessary
9    * constraints. When a InvalidRequestException is thrown a Bad Request (status
10   * code 400) does get sent with a message informing the client about the
11   * specific error.
12   **/
13  public class InvalidRequestException extends ShepardException {
14  
15    @Serial
16    private static final long serialVersionUID = 8918170154141864994L;
17  
18    public InvalidRequestException() {
19      super("The request is incorrect and cannot be processed", Status.BAD_REQUEST);
20    }
21  
22    public InvalidRequestException(String message) {
23      super(message, Status.BAD_REQUEST);
24    }
25  }