Skip to content

Error handling could crash instance due to type error #1489

@tsteckenborn

Description

@tsteckenborn

if (!travel) throw req.reject (404, `Travel "${travel.ID}" does not exist; may have been deleted meanwhile.`)

Here you're trying to read travel.ID after checking that travel is not defined. I assume trying this will crash it due to trying to read a property of something undefined.

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