IQSS / IQSS/dataverse

DV doesn't handle 404 pages gracefully

Open
#10,900 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

What steps does it take to reproduce the issue?

  1. Navigate to an URL that doesn't exist.
  2. Or access the endpoint without including the required query parameters.
    Example: Accessing https://archive.jhu.edu/oai without specifying the verb query parameter (e.g., https://archive.jhu.edu/oai?verb=Identify).
  • When does this issue occur?
    This issue occurs when a user attempts to access a page that doesn't exist or when the OAI-PMH endpoint without the necessary query parameters.

  • Which page(s) does it occur on?

  1. The issue occurs on places where a 404 (page not found).
  2. The issue occurs on OAI-PMH endpoints of Dataverse instances when the request is missing required query parameters.
  • What happens?
    Instead of a clear error message or 404 page, the following error is displayed:
This page contains the following errors:
error on line 20 at column 178: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.
  • To whom does it occur (all users, curators, superusers)?
    all users

  • What did you expect to happen?
    I expected Dataverse to return a more meaningful error message, such as "404 Not Found" or a clear explanation indicating that the required query parameters were missing from the request.

Which version of Dataverse are you using?
v6.1

Any related open or closed issues to this bug report?
No related issues found.

Screenshots:

Screenshot from 2024-10-01 09-18-25

Are you thinking about creating a pull request for this issue?
No, sorry.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with a nonexistent URL and with the OAI-PMH endpoint missing the verb query parameter. Start by tracing how Dataverse handles 404 responses and invalid OAI-PMH requests. Done means both cases return a clear 404 or missing-parameter response instead of malformed XML rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.