Skip to content

Commit

Permalink
Put License API can return HTTP 500
Browse files Browse the repository at this point in the history
License.fromXContent used to throw ElasticsearchException.
ExceptionsHelper.status mapped that to HTTP 500.

License.fromXContent now throws ElasticsearchParseException.
ExceptionsHelper.status maps that to HTTP 400.

Added LicenseIT.testPutInvalidTrialLicense to test with
truncated license signature.

Closes elastic#74058
  • Loading branch information
justincr-elastic committed Oct 13, 2021
1 parent c4c32d1 commit ba62e06
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package org.elasticsearch.client;

import org.elasticsearch.Build;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.ElasticsearchStatusException;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.license.DeleteLicenseRequest;
Expand All @@ -31,7 +30,6 @@
import org.junit.BeforeClass;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Map;

Expand All @@ -40,7 +38,6 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.CoreMatchers.startsWith;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.emptyOrNullString;
import static org.hamcrest.Matchers.not;
Expand Down

0 comments on commit ba62e06

Please sign in to comment.