# @jsprismarine/management-protocol errors

These are the errors `@jsprismarine/management-protocol` throws. [The error reference](https://jsprismarine.dev/errors/index.md) explains how to read an entry.


## `MANAGEMENT_PROTOCOL_INVALID_PARAMS`

`Invalid params for {method}: {reason}`

Thrown as `ManagementProtocolErrors.InvalidParams`, which extends `TypeError`.

A management client called a method with parameters it does not take: one is missing, of the
wrong type, or names something the server cannot act on. The client gets JSON-RPC error
-32602 with this text as its data. Fix the request to match the method's parameters in
`rpc.discover`.

## `MANAGEMENT_PROTOCOL_SECRET_INVALID`

`Invalid management server secret, must be 40 alphanumeric characters; it is {length} long`

Thrown as `ManagementProtocolErrors.SecretInvalid`, which extends `Error`.

`management-server-secret` is not 40 letters and digits. Management clients authenticate
with it, and Java Edition's server accepts no other form. Leave it empty to have the server
generate one, or set 40 characters from A-Z, a-z and 0-9.

## `MANAGEMENT_PROTOCOL_TLS_KEYSTORE_MISSING`

`management-server-tls-enabled is on, but the keystore {path} cannot be read`

Thrown as `ManagementProtocolErrors.TlsKeystoreMissing`, which extends `Error`.

`management-server-tls-enabled` is on, but `management-server-tls-keystore` names no file
the server can read. Point it at a PKCS12 keystore, or turn TLS off for a management server
that only listens on localhost.

