compute: spit out errors earlier

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-01-14 18:40:30 -08:00
parent 7a837ef8fb
commit 0a66b87d7d

View File

@ -88,8 +88,14 @@ func (env *Env) Compute(ctx context.Context) error {
lg.
Debug().
Msg("[Env.Compute] processing")
_, err := c.Compute(ctx, env.s, out)
if _, err := c.Compute(ctx, env.s, out); err != nil {
lg.
Error().
Err(err).
Msg("component failed")
return err
}
return nil
})
if err != nil {
return err