diff --git a/server/protocol.go b/server/protocol.go index f81bd42..ff5df62 100644 --- a/server/protocol.go +++ b/server/protocol.go @@ -11,7 +11,6 @@ import ( type ErrorCode int const ( - E_RUNTIME ErrorCode = -33000 E_PARSE ErrorCode = -32700 E_INVALID_REQ ErrorCode = -32600 E_NOT_FOUND_METHOD ErrorCode = -32601 @@ -63,18 +62,14 @@ func NewGrpcError(err error) *Error { var code ErrorCode switch resultStatus.Code() { - case grpcCodes.Unknown: - code = E_RUNTIME case grpcCodes.InvalidArgument: code = E_INVALID_PARAMS case grpcCodes.Internal: code = E_INTERNAL case grpcCodes.Unimplemented: code = E_NOT_FOUND_METHOD - case grpcCodes.Unavailable: - code = E_NOT_FOUND_METHOD default: - + code = E_SERVER } e := &Error{