Issue with report with no inputs

I'm using visualize.js to create a form dynamically based on what report a user selects and then what inputs that report has. However when the user selects a report that doesn't have inputs and visualize tries to look up what inputs the report has, visualize throws and error that it was "Unable to parse response from server". Is that the designed behavior? If so is there a way I can handle that error separately from other errors?

srang's picture
Joined: Oct 28 2014 - 11:52am
Last seen: 6 years 8 months ago

For reference I un-min-ed vizualize and the error is stemming from here:

if (!e || !e.inputControl || !t.isArray(e.inputControl)) throw new Error("Unable to parse response from server.");

srang - 8 years 2 months ago

Upon closer inspection this error doesn't seem to actually go back to the specified error handler. Here is my code (I have already run visualize.config) uri is the uri returned by resources search and I checked that it is valid:

visualize(function(v) {
  var ic = v.inputControls({
        resource: uri,
        success: function(data) {
        error: function(err) {
          console.log("Visualize.js error in InputControl retrieval");

When this runs on a report with inputs, the console logs the Array [ Object ], but when run on a report without inputs it only logs a JS error: "Error: Unable to parse response from server." However, other errors such as an authenticationError, still go through the error function properly.

srang - 8 years 2 months ago

0 Answers:

No answers yet