Skip to content

Uncaught exception on empty POST request #5

Description

@WillyKaze

firenodejs crash when an empty POST request is received:

HTTP : POST /firestep <= {}
TTY : WRITE(4) {}\n
TTY : READ(4) {"s":-118} \n
HTTP : firenodejs UNCAUGHT EXCEPTION:TypeError: Cannot read property 'id' of undefined
/home/fpd/repos/firenodejs/js/server.js:588
throw error;
^
TypeError: Cannot read property 'id' of undefined
at FireStepPlanner.onResponse (/home/fpd/repos/firenodejs/js/firestep/planner.js:365:26)
at Object.response (/home/fpd/repos/firenodejs/js/firestep/planner.js:27:18)
at FireStepDriver.onSerialData (/home/fpd/repos/firenodejs/js/firestep/driver.js:244:27)
at Socket.<anonymous> (/home/fpd/repos/firenodejs/js/firestep/driver.js:83:26)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at readableAddChunk (_stream_readable.js:147:16)
at Socket.Readable.push (_stream_readable.js:111:10)
at Pipe.onread (net.js:523:20)

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