diff --git a/core/services/workflows/syncer/orm.go b/core/services/workflows/syncer/orm.go index a33a0911ecb..4a5be9d1a58 100644 --- a/core/services/workflows/syncer/orm.go +++ b/core/services/workflows/syncer/orm.go @@ -3,7 +3,6 @@ package syncer import ( "context" "database/sql" - "errors" "time" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" @@ -232,9 +231,6 @@ func (orm *orm) GetWorkflowSpec(ctx context.Context, owner, name string) (*job.W var spec job.WorkflowSpec err := orm.ds.GetContext(ctx, &spec, query, owner, name) if err != nil { - if errors.Is(err, sql.ErrNoRows) { - return nil, nil // No spec found - } return nil, err } diff --git a/core/services/workflows/syncer/orm_test.go b/core/services/workflows/syncer/orm_test.go index 7ad013d64f3..1be4e54f472 100644 --- a/core/services/workflows/syncer/orm_test.go +++ b/core/services/workflows/syncer/orm_test.go @@ -192,7 +192,7 @@ func Test_GetWorkflowSpec(t *testing.T) { t.Run("fails if no workflow spec exists", func(t *testing.T) { dbSpec, err := orm.GetWorkflowSpec(ctx, "owner-123", "Test Workflow") - require.NoError(t, err) + require.Error(t, err) require.Nil(t, dbSpec) }) }