kinow commented on code in PR #2768: URL: https://github.com/apache/jena/pull/2768#discussion_r1797717945
########## jena-fuseki2/jena-fuseki-ui/package.json: ########## @@ -40,6 +42,7 @@ "@cypress/code-coverage": "^3.12.4", "@cypress/vue": "^6.0.0", "@eslint/js": "^9.2.0", + "@types/codemirror": "^5.60.15", Review Comment: CodeMirror is used as we import & call some of its functions in our code (for query editor). We also import the `@types` lib for codemirror, but that's development dev only. qs is the query string parser. ########## jena-fuseki2/jena-fuseki-ui/src/App.vue: ########## @@ -29,11 +29,13 @@ <script> import Menu from '@/components/Menu.vue' +import Toast from '@/components/Toast.vue' export default { name: 'App', components: { - Menu + Menu, + Toast Review Comment: We used it in the template, but did not import it. Vue/Vite were happy with that, but the IDE warns you when you don't do it (depending on your project setup, that may raise errors) ########## jena-fuseki2/jena-fuseki-ui/src/utils/query.js: ########## @@ -49,6 +49,6 @@ export function createShareableLink (query, path) { path + '?' + // Same as YASGUI does, good idea to avoid security problems... - queryString.stringify({ query }) + qs.stringify({ query }) Review Comment: Dropped `query-string`, using `qs` now (both were used), see issue main comment. ########## jena-fuseki2/jena-fuseki-ui/src/mixins/current-dataset-navigation-guards.js: ########## @@ -31,7 +31,7 @@ export default { }, async beforeRouteUpdate (from, to, next) { // eslint-disable-next-line no-unused-vars - next(async vm => { + next(async _ => { Review Comment: So that it's ignored. ########## jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js: ########## @@ -142,11 +142,11 @@ class FusekiService { }) } catch (error) { if (error.response) { - if (error.response.status !== 200) { - if (error.response.status === 409) { + if (error.response.statusCode !== 200) { + if (error.response.statusCode === 409) { throw new Error(`failed to create dataset "${datasetName}", reason: there is another dataset with the same name`) } - throw new Error(`failed to create dataset "${datasetName}" with type ${datasetType}, reason: HTTP status: "${error.response.status}", message: ${error.response.statusText}`) + throw new Error(`failed to create dataset "${datasetName}" with type ${datasetType}, reason: HTTP status: "${error.response.statusCode}", message: ${error.response.statusText}`) Review Comment: Probably a bug :disappointed_relieved: `status` is a function, so it would never be `200`, `409`. The IDE warned me about the type mismatch, and looking at the code I realized we should have used `statusCode`. Fixed, and tests updated too. The code would still fail to create the dataset, but I believe it was just not displaying a useful message. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org For additional commands, e-mail: pr-h...@jena.apache.org