Error Handling

Copper provides the cerrors package that helps add structure and context to your errors.

err := s.rockets.ThrustEngine(ctx, Engine3)
if err != nil {
    return cerrors.New(err, "failed to thrust engine", map[string]any{
        "engine": Engine3,
    })
}
circle-check

Last updated