Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Console logging an Error causes {"error":"Function returned invalid status code: 0. Raw body: empty.last"} #431

Open
@marktani

Description

@marktani

Issue by radicand
Sunday Dec 03, 2017 at 21:13 GMT
Originally opened as https://github.com/graphcool/prisma/issues/1359


If an error during a function is encountered, and one attempts to log the error with console.log(e) (where e is an Error object), then the framework will instead log a generic {"error":"Function returned invalid status code: 0. Raw body: empty.last"}.

There's a possibility it may just be that logging an Object in general causes this, but I haven't tested that.

Reproduction
Initialize a new project, and create a function that throws an error in a try block. Catch it and attempt to console.log the error. You can also try applying the google auth template, and calling googleAuthentication with a bad token (which will trip into this logic path).

Expected behavior?
The Error to be logged.

Possibly related issues:

  • #1320

Moved from:

  • #1031

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions