You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ki...@apache.org on 2024/10/12 15:03:51 UTC

(jena) 03/06: GH-2767: Fix possible bug: response.statusCode is int, status is a callable (and grammar/typo warnings)

This is an automated email from the ASF dual-hosted git repository.

kinow pushed a commit to branch GH-2767-fix-js-warnings
in repository https://gitbox.apache.org/repos/asf/jena.git

commit 2167dc7dcdaa682086f23f7d9a2766b83aa19702
Author: Bruno P. Kinoshita <ki...@users.noreply.github.com>
AuthorDate: Sat Oct 12 17:01:32 2024 +0200

    GH-2767: Fix possible bug: response.statusCode is int, status is a callable (and grammar/typo warnings)
---
 jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js b/jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js
index a090ec17f4..1537ccff54 100644
--- a/jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js
+++ b/jena-fuseki2/jena-fuseki-ui/src/services/fuseki.service.js
@@ -16,6 +16,8 @@
  */
 
 import axios from 'axios'
+// eslint-disable-next-line no-unused-vars
+import { AxiosResponse } from 'axios'
 import qs from 'qs'
 import ServerStatus from '@/model/server.status'
 import { BUS } from '@/events'
@@ -33,7 +35,7 @@ class FusekiService {
   }
 
   /**
-   * Gets the Fuseki URL, only the pathname onward. The protocol, server, port, etc,
+   * Gets the Fuseki URL, only the pathname onward. The protocol, server, port, etc.,
    * are left to the browser/JS engine & Vue to choose. Previously we were passing
    * strings such as `/#/ping$`. But this did not work when the application was
    * deployed on a Tomcat server, for example, where the base URL could be something
@@ -142,8 +144,8 @@ 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}`)
@@ -184,7 +186,7 @@ class FusekiService {
   /**
    * Get the data endpoint out of a list of server endpoints.
    *
-   * For now we are simply returning the first non-empty, but that
+   * For now, we are simply returning the first non-empty, but that
    * may change at some point.
    *
    * @private