srang Posted November 6, 2014 Share Posted November 6, 2014 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? Link to comment Share on other sites More sharing options...
srang Posted November 6, 2014 Author Share Posted November 6, 2014 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.");[/code] Link to comment Share on other sites More sharing options...
srang Posted November 7, 2014 Author Share Posted November 7, 2014 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) { console.log(data); }, error: function(err) { console.log("Visualize.js error in InputControl retrieval"); console.log(err); } });});[/code]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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now