[CORE] Add feature getter on LicenseExpiredException
Original commit: elastic/x-pack-elasticsearch@a04b73ff00
This commit is contained in:
parent
a397019139
commit
f6a2a690b2
|
@ -13,12 +13,19 @@ import org.elasticsearch.rest.RestStatus;
|
|||
*/
|
||||
public class LicenseExpiredException extends ElasticsearchException {
|
||||
|
||||
private final String feature;
|
||||
|
||||
public LicenseExpiredException(String feature) {
|
||||
super("license expired for feature [" + feature + "]");
|
||||
this.feature = feature;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestStatus status() {
|
||||
return RestStatus.UNAUTHORIZED;
|
||||
}
|
||||
|
||||
public String feature() {
|
||||
return feature;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue