mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-18 02:44:49 +00:00
[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 {
|
public class LicenseExpiredException extends ElasticsearchException {
|
||||||
|
|
||||||
|
private final String feature;
|
||||||
|
|
||||||
public LicenseExpiredException(String feature) {
|
public LicenseExpiredException(String feature) {
|
||||||
super("license expired for feature [" + feature + "]");
|
super("license expired for feature [" + feature + "]");
|
||||||
|
this.feature = feature;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RestStatus status() {
|
public RestStatus status() {
|
||||||
return RestStatus.UNAUTHORIZED;
|
return RestStatus.UNAUTHORIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String feature() {
|
||||||
|
return feature;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user