Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all articles
Browse latest Browse all 1523

Queued NodeJS Server-Side Script and exception throwing

$
0
0

@tizzyapunkt wrote:

NodeJS Queued Server-Side Script succeeds even on throwing an exception.

To check if I missed something I simply created a NodeJS Server-Side Script with the following code:

throw new Error('Something went wrong');

If I call the Endpoint with any method but without queueing the script, the server responds with error 500 and the script execution stops immediately.

If I call the Endpoint with any method but with queueing the script and then let the worker execute it from the queue, no exception get's thrown, the job succeeds and it disappears from the queue. This is bad because I need to take care of failed jobs (retrying later, check whats wrong etc.)

I tested this with V8js as script type and this works as expected (stops execution of the script, don't deletes it from the queue, increasing attempts by 1 etc.) with and without queuing.

Because of a lot of async stuff, I cannot user V8js here and I am in need of NodeJS.

Any suggestions on that?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1523

Trending Articles