Skip to content

Commit 4aa8c04

Browse files
Fix spelling (#4305)
Signed-off-by: Andrey Pleskach <ples@aiven.io> (cherry picked from commit af358d0) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 38132ec commit 4aa8c04

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/main/java/org/opensearch/security/dlic/rest/api/AbstractApiAction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
import static org.opensearch.security.dlic.rest.api.Responses.conflict;
7575
import static org.opensearch.security.dlic.rest.api.Responses.forbidden;
7676
import static org.opensearch.security.dlic.rest.api.Responses.forbiddenMessage;
77-
import static org.opensearch.security.dlic.rest.api.Responses.internalSeverError;
77+
import static org.opensearch.security.dlic.rest.api.Responses.internalServerError;
7878
import static org.opensearch.security.dlic.rest.api.Responses.payload;
7979
import static org.opensearch.security.dlic.rest.support.Utils.withIOException;
8080

@@ -482,7 +482,7 @@ public final void onFailure(Exception e) {
482482
if (ExceptionsHelper.unwrapCause(e) instanceof VersionConflictEngineException) {
483483
conflict(channel, e.getMessage());
484484
} else {
485-
internalSeverError(channel, "Error " + e.getMessage());
485+
internalServerError(channel, "Error " + e.getMessage());
486486
}
487487
}
488488

@@ -579,7 +579,7 @@ protected final RestChannelConsumer prepareRequest(RestRequest request, NodeClie
579579

580580
// check if .opendistro_security index has been initialized
581581
if (!ensureIndexExists()) {
582-
return channel -> internalSeverError(channel, RequestContentValidator.ValidationError.SECURITY_NOT_INITIALIZED.message());
582+
return channel -> internalServerError(channel, RequestContentValidator.ValidationError.SECURITY_NOT_INITIALIZED.message());
583583
}
584584

585585
// check if request is authorized

src/main/java/org/opensearch/security/dlic/rest/api/FlushCacheApiAction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.opensearch.security.securityconf.impl.CType;
2929
import org.opensearch.threadpool.ThreadPool;
3030

31-
import static org.opensearch.security.dlic.rest.api.Responses.internalSeverError;
31+
import static org.opensearch.security.dlic.rest.api.Responses.internalServerError;
3232
import static org.opensearch.security.dlic.rest.api.Responses.ok;
3333
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
3434

@@ -73,7 +73,7 @@ private void flushCacheApiRequestHandlers(RequestHandler.RequestHandlersBuilder
7373
public void onResponse(ConfigUpdateResponse configUpdateResponse) {
7474
if (configUpdateResponse.hasFailures()) {
7575
LOGGER.error("Cannot flush cache due to", configUpdateResponse.failures().get(0));
76-
internalSeverError(
76+
internalServerError(
7777
channel,
7878
"Cannot flush cache due to " + configUpdateResponse.failures().get(0).getMessage() + "."
7979
);
@@ -86,7 +86,7 @@ public void onResponse(ConfigUpdateResponse configUpdateResponse) {
8686
@Override
8787
public void onFailure(final Exception e) {
8888
LOGGER.error("Cannot flush cache due to", e);
89-
internalSeverError(channel, "Cannot flush cache due to " + e.getMessage() + ".");
89+
internalServerError(channel, "Cannot flush cache due to " + e.getMessage() + ".");
9090
}
9191

9292
}

src/main/java/org/opensearch/security/dlic/rest/api/MigrateApiAction.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
import org.opensearch.threadpool.ThreadPool;
6464

6565
import static org.opensearch.security.dlic.rest.api.Responses.badRequest;
66-
import static org.opensearch.security.dlic.rest.api.Responses.internalSeverError;
66+
import static org.opensearch.security.dlic.rest.api.Responses.internalServerError;
6767
import static org.opensearch.security.dlic.rest.api.Responses.ok;
6868
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
6969
// CS-ENFORCE-SINGLE
@@ -218,7 +218,7 @@ public void onResponse(CreateIndexResponse response) {
218218
}
219219
} catch (final IOException e1) {
220220
LOGGER.error("Unable to create bulk request " + e1, e1);
221-
internalSeverError(channel, "Unable to create bulk request.");
221+
internalServerError(channel, "Unable to create bulk request.");
222222
return;
223223
}
224224

@@ -235,7 +235,7 @@ public void onResponse(BulkResponse response) {
235235
"Unable to upload migrated configuration because of "
236236
+ response.buildFailureMessage()
237237
);
238-
internalSeverError(
238+
internalServerError(
239239
channel,
240240
"Unable to upload migrated configuration (bulk index failed)."
241241
);
@@ -249,7 +249,7 @@ public void onResponse(BulkResponse response) {
249249
@Override
250250
public void onFailure(Exception e) {
251251
LOGGER.error("Unable to upload migrated configuration because of " + e, e);
252-
internalSeverError(channel, "Unable to upload migrated configuration.");
252+
internalServerError(channel, "Unable to upload migrated configuration.");
253253
}
254254
}
255255
)
@@ -260,7 +260,7 @@ public void onFailure(Exception e) {
260260
@Override
261261
public void onFailure(Exception e) {
262262
LOGGER.error("Unable to create opendistro_security index because of " + e, e);
263-
internalSeverError(channel, "Unable to create opendistro_security index.");
263+
internalServerError(channel, "Unable to create opendistro_security index.");
264264
}
265265
});
266266

@@ -272,7 +272,7 @@ public void onFailure(Exception e) {
272272
@Override
273273
public void onFailure(Exception e) {
274274
LOGGER.error("Unable to delete opendistro_security index because of " + e, e);
275-
internalSeverError(channel, "Unable to delete opendistro_security index.");
275+
internalServerError(channel, "Unable to delete opendistro_security index.");
276276
}
277277
});
278278

src/main/java/org/opensearch/security/dlic/rest/api/Responses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static void conflict(final RestChannel channel, final String message) {
5050
response(channel, RestStatus.CONFLICT, message);
5151
}
5252

53-
public static void internalSeverError(final RestChannel channel, final String message) {
53+
public static void internalServerError(final RestChannel channel, final String message) {
5454
response(channel, RestStatus.INTERNAL_SERVER_ERROR, message);
5555
}
5656

src/main/java/org/opensearch/security/dlic/rest/api/ValidateApiAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import org.opensearch.threadpool.ThreadPool;
4141

4242
import static org.opensearch.security.dlic.rest.api.Responses.badRequest;
43-
import static org.opensearch.security.dlic.rest.api.Responses.internalSeverError;
43+
import static org.opensearch.security.dlic.rest.api.Responses.internalServerError;
4444
import static org.opensearch.security.dlic.rest.api.Responses.ok;
4545
import static org.opensearch.security.dlic.rest.support.Utils.addRoutesPrefix;
4646

@@ -125,7 +125,7 @@ protected void validate(RestChannel channel, RestRequest request) throws IOExcep
125125

126126
ok(channel, "OK.");
127127
} catch (Exception e) {
128-
internalSeverError(channel, "Configuration is not valid.");
128+
internalServerError(channel, "Configuration is not valid.");
129129
}
130130
}
131131

0 commit comments

Comments
 (0)