OpenFn / OpenFn/kit

Worker/engine: sort out errors

Open
#1,004 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This has bugged me for ages and I need to spend a day getting my head staight on it

What does an error look like?

I think it should be like:

{
   type: // general class of error - like the classname (CompileError, RuntimeError, AdaptorError)
   name: // human readable name for the  error, like SyntaxError, ReferenceError
}

It's a bit tricky because the base JS spec is vague on this, and there are layers of error (a SyntaxError wraps a lower level JS error), so its kinda tricky to pick good names

We also need to ensure that errors serialise well, with a nice clean error and a stack

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 by mapping the Worker/engine error paths and reviewing how JavaScript errors are currently wrapped and serialized. The work is done when the project agrees on the error type and name shape, preserves useful layering, and produces clean serialized errors with a stack.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.