how to setup Grpc status and code in golang with Client
camera, err := db.ClientDB.GetCamera(ctx, in.CameraId) if err != nil { fmt.Println(“err”, err) if errors.Is(err, errors.New(“camera not found”)) { return nil, status.Error(codes.NotFound, “Camera not found”) } return nil, status.Error(codes.Internal, “Problem getting camera apps”) } message GetCameraApplicationsResponse { vision.core.CameraAppCollection camera_apps = 1; } export async function getCameraApplications( cameraId: string ): Promise<GetCameraApplicationsResponse> { try { var request: GetCameraApplicationsRequest […]