OpenFn / OpenFn/kit

runtime: error reporting in promises is a bit dodgy

Open
#924 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 is not helpful error output:

[R/T] ✘ job-1 aborted with error (1.05s)
[R/T] ✘ Error reported by "_defer()" operation line -1:

Basically when trying to find the parent operation, we find the magic compiled-in defer function

I think you can reproduce like this:

fn(s => s).then(s => { throw new Error('boop') })

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 reproducing the report with fn(s => s).then(s => { throw new Error('boop') }) and trace how the runtime finds the parent operation for the promise error. Done means the error identifies the actual failing operation instead of the compiled-in _defer() function and line -1.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
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.