Skip to content

Expression type error doesn't add additional context #766

@spentacular

Description

@spentacular

Describe the bug

When this error is thrown it doesn't add any additional context that may exist on the node, which is even typed here.

This makes it difficult when viewing the error on the storybook summary page here: https://github.com/player-ui/player/blob/main/tools/storybook/src/player/PlayerFlowSummary.tsx#L65-L69 because it gives no additional context.

The error that is referenced via this storybook block also doesn't throw in the console since it's caught by the error boundary.

To Reproduce

Simplest flow reference:

{
  "id": "test",
  "views": [
    {
      "id": "test",
      "type": "text",
      "value": "testing",
      "metaData": {
        "beacon": "@[conditional(')]@"
      }
    }
  ],
  "navigation": {
    "BEGIN": "FLOW_1",
    "FLOW_1": {
      "startState": "VIEW_1",
      "VIEW_1": {
        "state_type": "VIEW",
        "ref": "test",
        "transitions": {
          "*": "END_Done"
        }
      },
      "END_Done": {
        "state_type": "END",
        "outcome": "done"
      }
    }
  }
}

Error that exists on the actual node:

Image

Expected behavior

Error would provide additional details that exist, as well as the storybook also throwing the error to enable adding breakpoints easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions