Skip to content

Disable console.errors in production mode when typechecking #781

@nathanbirrell

Description

@nathanbirrell

Scenario

  • Use typecheck to validate a model at runtime (with NODE_ENV=production)
  • Cause an exception in that check using invalid data

Expected

Error is thrown by MST, so that I can catch it a level above, but no console.error gets logged in production.

Actual

Error is thrown by MST, console.error gets logged.

Do we really want to log console errors in production?

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