dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

DV doesn't handle 404 pages gracefully

Open DonRichards opened this issue 1 year ago • 4 comments

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.

DonRichards avatar Oct 01 '24 13:10 DonRichards

@DonRichards I don't get the same behavior on v6.4: https://demo.dataverse.org/oai

donsizemore avatar Oct 01 '24 14:10 donsizemore

Thanks for the bug report. I think we fixed this in 6.2:

  • #10205

The original bug report is here:

  • #9275

pdurbin avatar Oct 01 '24 14:10 pdurbin

“I’ve updated to version 6.2, and I’m encountering an error related to configuration issues. While the 404 page aspect appears to be resolved, I expected that most application functionality would be protected by try/catch mechanisms to prevent this type of error. After following the release notes for updating the domain.xml for multiple PID providers, I inadvertently introduced an issue that triggered this error. Should I create a new ticket?

DonRichards avatar Oct 21 '24 20:10 DonRichards

@DonRichards yes, please! ❤️

pdurbin avatar Oct 22 '24 13:10 pdurbin