Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Conversation

@cskeefer
Copy link
Collaborator

@cskeefer cskeefer commented Jan 30, 2020

For Issue #188

Displaying errors has been a pain point for a while and this is one way to go about a fix. Historically, data-explorer was more of a server-only app where the UI was generated on the server. Because of that, errors were created/returned in HTML via the error.xqy file and rendered directly in the browser. Some time ago, data-explorer was changed to be more client server where the client is written using angularJS. With this methodology, errors returned from REST calls that are a full HTML page weren't very useful. As such I changed error.xqy to convert the error stack to JSON and changed the content type to application/json. This will allow us to inspect the error from angularJS and display something more meaningful than "...an error occurred". It will also let us easily inspect the error in the Network tab of the browser dev tools.

I've only updated the call to create a query to inspect the JSON return and show a better message if there is no schemas database. The rest of the places where we display an error message should continue to work as is (with the vague msg), but we can change to show a more specific error in the future.

In doing this fix I have also assumed the requirement that a content database will have a schemas database associated with it. If this isn't a fair assumption, we'll have to do something else but it seems troublesome to support creating TDEs and not require a schemas database.

I also included changes to the build.gradle file so the artifacts are retrieved from repos using HTTPS and did an ml-gradle and ml-app-deployer bump to 3.17.0. These changes are also in PR #198 but I need them here as well so I could run ml-deploy to develop and test. Note this will likely require a JDK newer than 8 so you get the cert that allows HTTPS access to the repos.

…esn't have a schemas database associated with it
@cskeefer cskeefer changed the title Fix for showing error message when adding a query but the database do… Fix for showing an error message when no schemas database exists Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants