Skip to content

json_error_handler elusive error #88

@Celadora

Description

@Celadora

in fittings/json_error_handler.js there is a "TODO: find what's throwing here..."

line 41: delete(context.error);

is the culprit. This cannot be deleted or set to null, or the middleware will fail to resolve next(); I don't know entirely why, and setting it to null will also cause a failure. I suspect that Express is expecting this field to be an Error object, and so ignores calls to next that are missing that property.

To fix this, and prevent leaking error information, please change line 41 in fittings/json_error_handler.js to:

context.error = new Error(null);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions