Skip to content

GH-2162: Add more detailed logging to upload errors.#4052

Open
ThomasThelen wants to merge 1 commit into
apache:mainfrom
ThomasThelen:issue_2162
Open

GH-2162: Add more detailed logging to upload errors.#4052
ThomasThelen wants to merge 1 commit into
apache:mainfrom
ThomasThelen:issue_2162

Conversation

@ThomasThelen

@ThomasThelen ThomasThelen commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

GitHub issue resolved #2162

Pull request Description:

This PR adds support for displaying Fuseki's error message, or a fallback if not present. The error message was already in an existing object; most of the lines of code are for the fallback.

Some of the fallback messages could be informative but I didn't want to prescribe too many solutions, miss others that I don't know about, etc. If any can be improved let me know.

Demo:

Screen.Recording.2026-07-07.at.7.26.20.PM.mov

  • Tests are included.
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@afs afs self-assigned this Jul 10, 2026
@afs

afs commented Jul 10, 2026

Copy link
Copy Markdown
Member

Looks great and much more helpful to the user.

It works for me in development (I have rebased to current main; suitable browser cache refresh to get the javascript) but the build is failing in tests, both on github (see the buld failure at "All checks have failed") and in a local build:

 tests/unit/views/dataset/upload.vue.spec.js (11 tests | 1 failed) 60ms
[INFO]        ✓ returns "danger" for a file with an error 19ms
[INFO]        ✓ returns "success" for a successfully uploaded file 4ms
[INFO]        × returns "warning" for an active upload 7ms
[INFO]        ✓ returns empty string for a file with no status 4ms
. . .

Longer extract of build of jena-fuseki-ui:

jena-fuseki-ui build log
--- frontend:2.0.1:yarn (yarn run test:unit) @ jena-fuseki-ui ---
[INFO] Running 'yarn run test:unit' in /home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui
[INFO] yarn run v1.22.17
[INFO] $ vitest run --pool=threads --environment jsdom
[INFO] 
[INFO]  RUN  v4.1.9 /home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui
[INFO] 
[INFO]  ✓ tests/unit/utils/validation.spec.js (4 tests) 3ms
[INFO]  ✓ tests/unit/utils/query.spec.js (1 test) 3ms
[INFO]  ✓ tests/unit/components/dataset/pagination.vue.spec.js (4 tests) 40ms
[INFO]  ✓ tests/unit/components/serverstatus.vue.spec.js (3 tests) 27ms
[INFO]  ✓ tests/unit/services/fuseki.service.spec.js (20 tests) 15ms
[INFO]  ✓ tests/unit/components/dataset/tablelisting.vue.spec.js (2 tests) 27ms
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getFileStatus > returns "danger" for a file with an error
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getFileStatus > returns "success" for a successfully uploaded file
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getFileStatus > returns "warning" for an active upload
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getFileStatus > returns empty string for a file with no status
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getUploadErrorMessage > returns the server's detailed plain-text error response, when present
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getUploadErrorMessage > returns the message field from a JSON error response, when present
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getUploadErrorMessage > falls back to a readable message for a generic "server" error code
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getUploadErrorMessage > falls back to a readable message for a generic "network" error code
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getUploadErrorMessage > returns a generic message when there is no file
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > file list validation > does not flag the form invalid just from removing the last (failed) file
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO] stderr | tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > file list validation > still flags the form invalid on an explicit submit attempt with no files
[INFO] [Vue warn]: Missing required prop: "datasetName" 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] [Vue warn]: Invalid prop: type check failed for prop "datasetName". Expected String with value "undefined", got Undefined  
[INFO]   at <Menu dataset-name=undefined > 
[INFO]   at <DatasetUpload ref="VTU_COMPONENT" > 
[INFO]   at <VTUROOT>
[INFO] 
[INFO]  ❯ tests/unit/views/dataset/upload.vue.spec.js (11 tests | 1 failed) 60ms
[INFO]        ✓ returns "danger" for a file with an error 19ms
[INFO]        ✓ returns "success" for a successfully uploaded file 4ms
[INFO]        × returns "warning" for an active upload 7ms
[INFO]        ✓ returns empty string for a file with no status 4ms
[INFO]        ✓ returns the server's detailed plain-text error response, when present 4ms
[INFO]        ✓ returns the message field from a JSON error response, when present 3ms
[INFO]        ✓ falls back to a readable message for a generic "server" error code 3ms
[INFO]        ✓ falls back to a readable message for a generic "network" error code 3ms
[INFO]        ✓ returns a generic message when there is no file 3ms
[INFO]        ✓ does not flag the form invalid just from removing the last (failed) file 7ms
[INFO]        ✓ still flags the form invalid on an explicit submit attempt with no files 3ms
[INFO] stderr | tests/unit/views/dataset/query.vue.spec.js > Query view > is created with the correct initial values
[INFO] [TypeError: Failed to parse URL from //prefix.cc/popular/all.file.json] {
[INFO]   [cause]: TypeError: Invalid URL
[INFO]       at new URL (node:internal/url:840:25)
[INFO]       at new URL (file:///home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/vitest/dist/chunks/index.DC7d2Pf8.js:557:2)
[INFO]       at new Request (node:internal/deps/undici/undici:11855:25)
[INFO]       at fetch (node:internal/deps/undici/undici:12780:25)
[INFO]       at fetch (node:internal/deps/undici/undici:17456:10)
[INFO]       at fetch (node:internal/bootstrap/web/exposed-window-or-worker:83:12)
[INFO]       at Object.get (/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:471583)
[INFO]       at i.value (/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:475070)
[INFO]       at i.value (/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:475829)
[INFO]       at i.value (/home/afs/ASF/jena-review/jena-fuseki2/jena-fuseki-ui/node_modules/@zazuko/yasqe/build/yasqe.min.js:2:508044) {
[INFO]     code: 'ERR_INVALID_URL',
[INFO]     input: '//prefix.cc/popular/all.file.json'
[INFO]   }
[INFO] }
[INFO] 
[INFO]  ✓ tests/unit/views/dataset/query.vue.spec.js (1 test) 90ms
[INFO] 
[INFO] ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
[INFO] 
[INFO]  FAIL  tests/unit/views/dataset/upload.vue.spec.js > Upload.vue > getFileStatus > returns "warning" for an active upload
[INFO] AssertionError: expected 'primary' to be 'warning' // Object.is equality
[INFO] 
[INFO] Expected: "warning"
[INFO] Received: "primary"
[INFO] 
[INFO]  ❯ tests/unit/views/dataset/upload.vue.spec.js:51:87
[INFO]      49|     it('returns "warning" for an active upload', () => {
[INFO]      50|       const wrapper = mountFunction()
[INFO]      51|       expect(wrapper.vm.getFileStatus({ error: null, success: false, a…
[INFO]        |                                                                                       ^
[INFO]      52|     })
[INFO]      53|
[INFO] 
[INFO] ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
[INFO] 
[INFO] 
[INFO]  Test Files  1 failed | 7 passed (8)
[INFO]       Tests  1 failed | 45 passed (46)
[INFO]    Start at  15:15:02
[INFO]    Duration  1.17s (transform 547ms, setup 0ms, import 1.32s, tests 265ms, environment 3.08s)
[INFO] 
[INFO] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[INFO] ------------------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detailed error output in fuseki2 webapp

2 participants