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