Skip to content

Exceptions in R code poorly handled #40

@ccornchip

Description

@ccornchip

I'm having troubles when the R script fails with an exception. I'm getting a "SyntaxError: Unexpected end of JSON input" when my R code hits an exception.

The problem is that when I hit an R exception, body is an empty string here

callback(null, JSON.parse(body));

This then causes my whole application to crash!

May I humbly suggest changing this line to

    if (body) callback(null, JSON.parse(body));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions