Skip to content

Instantly share code, notes, and snippets.

@Raouf25
Last active April 24, 2020 16:57
Show Gist options
  • Save Raouf25/c518d4bc9a8a37fbf3dc44f23443ff36 to your computer and use it in GitHub Desktop.
Save Raouf25/c518d4bc9a8a37fbf3dc44f23443ff36 to your computer and use it in GitHub Desktop.
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
@Getter
@RequiredArgsConstructor
public enum ErrorEnum {
CLIENT_UNAVAILABLE_ERROR("Service unavailable.", HttpStatus.BAD_REQUEST),
RESOURCE_NOT_FOUND("Resource not found.", HttpStatus.NOT_FOUND);
private final String message;
private final HttpStatus status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment