ErrorMessages.java
package fr.metabocloud.core.model;
/**
* Object used to store error messages that may be returned by the application.
*
* @author Faustine Souc
* @since 1.0.0
* @version 1.0.0
*/
public enum ErrorMessages {
/**
* Invalid Input error message.
*/
INVALID_INPUT("The input sent in the request body is invalid."),
/**
* Bad Request Body structure error message.
*/
BAD_REQUEST_BODY_STRUCTURE("The request body is incorrectly formatted. Only one field can be used to send data. "
+ ErrorMessages.SEE_DOCUMENTATION),
/**
* Empty Request Body error message.
*/
EMPTY_REQUEST_BODY("No data could be retrieved from the request body. "
+ "A field name may be misspelled or no data was sent in the request body. "
+ ErrorMessages.SEE_DOCUMENTATION);
/**
* See documentation message
*/
public static final String SEE_DOCUMENTATION = "See the documentation for more details.";
/**
* The label associated with the error message.
*/
public final String label;
/**
* Private constructor to initialize the enum constant with its corresponding
* label.
*
* @param label The label associated with the error message.
*/
ErrorMessages(final String label) {
this.label = label;
}
}