OpenFn / OpenFn/kit

CLI (runtime?): report better errors when adaptors aren't installed

Open
#223 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement UX
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

A common problem is to try and run a job - particularly a workflow - when adaptors aren't installed to the repo.

Right now the error you get isn't very good or very useful. We can do better.

 throw new Error(`Failed to load module “${specifier}“`);
        ^
Error: Failed to load module “@openfn/language-postgresql”

This raises the idea of prevalidating adaptors in the CLI before running the job - which I abandoned because it was getting a bit too complex.

But maybe if -i isn't provided and the repo doesn't provide a matching version, we can raise an error

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CLI path that runs a job or workflow and follows adaptor module loading, especially when -i is absent. Reproduce the missing @openfn/language-postgresql error, then determine the expected message for a repo without a matching adaptor version; done means the CLI reports a useful, actionable error before or instead of the current module-load failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.