Automattic / Automattic/kue

Error should return an object not a string

Open
#1,001 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.4k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

Im running into an issue where my errors are been returned as a string and not an object as they should.

After wasting an hour debugging I have found that this is the line thats the problem.
https://github.com/Automattic/kue/blob/master/lib/queue/worker.js#L123

Why would you return only the error message and not the full error. And whats the point on calling toString on an object.. `theErr.toString()=='[object Object]'`

edit:
Should be like this https://github.com/MangoRaft/kue/commit/47936ef1468c3a14f12b57e5a4db724f2808c240

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at lib/queue/worker.js around line 123 and compare the error handling with the referenced MangoRaft commit. Verify that worker errors are returned as full objects rather than converted to strings. Done means the reported error retains its object data and the existing worker behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.