Class ConnectError

java.lang.Object
org.mockserver.grpc.connect.ConnectError

public class ConnectError extends Object
A Connect protocol (buf.build Connect) unary error.

Connect unary errors are returned as a non-200 HTTP response with a JSON body of the shape:


 {
   "code": "not_found",
   "message": "...",
   "details": [ ... ]
 }
 
where code is one of the canonical Connect error code strings. Connect error codes are the lower-case snake_case forms of the gRPC status names (e.g. gRPC INVALID_ARGUMENT -> Connect invalid_argument), and each maps to a specific HTTP status code per the Connect specification (https://connectrpc.com/docs/protocol#error-codes).

The HTTP status mapping mirrors the Connect reference implementation's codeToHTTP (connectrpc/connect-go), which is in turn consistent with GrpcStatusMapper. There is no Connect code for gRPC OK; a successful unary response is an HTTP 200 with the message body, not an error envelope.