Skip to content

Commit

Permalink
Fix error code when invalid procedure arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Apr 13, 2023
1 parent 4194377 commit 0729557
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.google.common.collect.ImmutableList;
import io.trino.plugin.hive.HiveErrorCode;
import io.trino.plugin.hive.metastore.cache.CachingHiveMetastore;
import io.trino.spi.StandardErrorCode;
import io.trino.spi.TrinoException;
import io.trino.spi.classloader.ThreadContextClassLoader;
import io.trino.spi.procedure.Procedure;
Expand Down Expand Up @@ -153,9 +154,7 @@ else if (schemaName.isPresent() && tableName.isPresent()) {
}
}
else {
throw new TrinoException(
HiveErrorCode.HIVE_METASTORE_ERROR,
"Illegal parameter set passed. " + PROCEDURE_USAGE_EXAMPLES);
throw new TrinoException(StandardErrorCode.INVALID_PROCEDURE_ARGUMENT, "Illegal parameter set passed. " + PROCEDURE_USAGE_EXAMPLES);
}
}

Expand Down

0 comments on commit 0729557

Please sign in to comment.