# INTERNAL: grpc: invalid message encoding "custom-enc"

- **ID:** `grpc/grpc-invalid-message-encoding`
- **Domain:** grpc
- **Category:** encoding_error
- **Error Code:** `EENC`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Client or server sends a message with a custom Content-Encoding or Message-Encoding that the peer does not support.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC v1.63.0 | active | — | — |
| gRPC v1.60.0 | active | — | — |
| gRPC v1.57.0 | active | — | — |
| Go gRPC v1.62.0 | active | — | — |

## Workarounds

1. **Register a custom codec on both client and server using the same name, e.g., via `grpc.RegisterCompressor` or `WithDefaultCallOptions(grpc.UseCompressor('custom-enc'))`.** (90% success)
   ```
   Register a custom codec on both client and server using the same name, e.g., via `grpc.RegisterCompressor` or `WithDefaultCallOptions(grpc.UseCompressor('custom-enc'))`.
   ```
2. **Fall back to standard gRPC compression (gzip) by removing the custom encoding from the client's call options.** (80% success)
   ```
   Fall back to standard gRPC compression (gzip) by removing the custom encoding from the client's call options.
   ```

## Dead Ends

- **Adding the encoding to server's supported list without implementing the codec** — The server will accept the encoding but fail to decompress, causing DATA_LOSS. (80% fail)
- **Disabling all compression on the client** — The error is about unrecognized encoding, not compression being enabled. (60% fail)
