Skip to content

Commit

Permalink
improve error for schema name validation (apache#14517)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohityadav1993 authored Nov 22, 2024
1 parent 2a2a2d1 commit 453121d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ private void validateSchemaName(Schema schema) {
"Invalid schema. Reason: 'schemaName' should not be null or empty", Response.Status.BAD_REQUEST);
}
if (schema.getSchemaName().contains(TableConfig.TABLE_NAME_FORBIDDEN_SUBSTRING)) {
throw new IllegalStateException("'schemaName' cannot contain double underscore ('__')");
throw new ControllerApplicationException(LOGGER, "'schemaName' cannot contain double underscore ('__')",
Response.Status.BAD_REQUEST);
}
}

Expand Down

0 comments on commit 453121d

Please sign in to comment.