Standardise socket errors between lightning an the worker
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
We need to ensure that when Lightning returns an error to the worker through the socket (ie, failing to get a credential, missing properties on step:complete), the structure of that error is consistent and parsable by the worker.
I think that Lightning is fairly consistent in how it returns errors, but the worker certainly is not. We need good (and accurate and up to date) typings, good errors returned by the mock lightning, and updated tests
One part of this I want to think about is that Lightning returns a generic error object with errors per thing, by id. Like:
errors: {
'asdfe-afafaf-afaa': [ error1, error2 ]
}
But often the context should make it clear what is in error. Like on fetch credential, we know the related run and we know the requested credential id. So logging the whole error object probably isn't useful for users - we need to parse the error structure and pull out just the relevant information.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Lightning sends socket errors to the worker, including credential failures and missing step:complete properties, then inspect the existing worker typings, mock Lightning responses, and related tests. Done means the error structure is consistent and parsable, typings are accurate, mock errors match it, and tests cover the updated behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100