diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java index 5c682b6dad..8905def578 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/PluginsReloadConfiguration.java @@ -52,7 +52,7 @@ public class PluginsReloadConfiguration implements JsonRpcMethod { "Plugin cannot be reloaded because no plugin has been registered with specified name: {}.", pluginName); return new JsonRpcErrorResponse( - requestContext.getRequest().getId(), JsonRpcError.INTERNAL_ERROR); + requestContext.getRequest().getId(), JsonRpcError.PLUGIN_NOT_FOUND); } reloadPluginConfig(namedPlugins.get(pluginName)); return new JsonRpcSuccessResponse(requestContext.getRequest().getId()); diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/JsonRpcError.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/JsonRpcError.java index 5b61f2cfaa..a18159dffb 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/JsonRpcError.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/JsonRpcError.java @@ -150,7 +150,10 @@ public enum JsonRpcError { ENCLAVE_PRIVACY_GROUP_MISSING(-50200, "PrivacyGroupNotFound"), ENCLAVE_PRIVACY_QUERY_ERROR(-50200, "PrivacyGroupQueryError"), ENCLAVE_KEYS_CANNOT_DECRYPT_PAYLOAD(-50200, "EnclaveKeysCannotDecryptPayload"), - METHOD_UNIMPLEMENTED(-50200, "MethodUnimplemented"); + METHOD_UNIMPLEMENTED(-50200, "MethodUnimplemented"), + + /** Plugins error */ + PLUGIN_NOT_FOUND(-60000, "Plugin not found"); private final int code; private final String message;