Skip to content

Broken vis in an example breaks extension #160

@travisby

Description

@travisby

Hello!

I had a syntax error in my explore example. In particular, the output ended in &vis={"type":"looker_bar". NOTE the missing closing brace.

This led to the explore assistant UI throwing a console error:

bundle.js:75 vis={"type":"looker_bar"
08:37:06.020 VM52095:1 Uncaught (in promise) SyntaxError: Expected ',' or '}' after property value in JSON at position 20 (line 1 column 21)
    at JSON.parse (<anonymous>)
    at bundle.js:75:98060
    at bundle.js:75:98300
    at Array.map (<anonymous>)
    at bundle.js:75:97280
    at bundle.js:75:150651
    at Generator.next (<anonymous>)
    at e (bundle.js:2:1402454)
    at s (bundle.js:2:1402657)
    at bundle.js:2:1402716

And the application hung, appearing as if it was still waiting for a response from Vertex.

This looks like this LOC:

const visString = vis_config ? JSON.stringify(vis_config) : ''


This happens even if the question I'm asking is unrelated to that example (but related to that explore!)


It'd be great if the extension did some validation or spit out louder when an error occurred. It took me a while to realize there was a console error, after hours of network request and model debugging 😆

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions