Skip to content

Improve Error Message for invalid syntax #23

@mulderp

Description

@mulderp

I observe the following:

pmu:tmp pmu$ mkdir api
pmu:tmp pmu$ cat > api/posts.json
[ "123" ]
pmu:tmp pmu$ canned
starting canned on port 3000 for ./
request: get /api/posts.json
/usr/local/share/npm/lib/node_modules/canned/lib/response.js:17
  this.cors_enabled = !!options.cors_enabled
                               ^
TypeError: Cannot read property 'cors_enabled' of undefined
    at new Response (/usr/local/share/npm/lib/node_modules/canned/lib/response.js:17:32)
    at /usr/local/share/npm/lib/node_modules/canned/canned.js:194:48
    at Object.oncomplete (fs.js:107:15)

Maybe I am missing something?

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