Skip to content

Improve 404 error message for clarity#18

Open
dheles wants to merge 1 commit intomainfrom
better-404
Open

Improve 404 error message for clarity#18
dheles wants to merge 1 commit intomainfrom
better-404

Conversation

@dheles
Copy link
Contributor

@dheles dheles commented Jun 30, 2025

No description provided.

@dheles dheles requested a review from mark-cooper June 30, 2025 17:07
@mark-cooper
Copy link
Contributor

@dheles how about?

raise Error, "No results found for request, returns #{response.status} - #{response.body}"

From a client perspective it's unusual to put itself (url) into the message, I'd expect that to come from the context, so wherever the client is being called from should log what it's doing.

@dheles
Copy link
Contributor Author

dheles commented Jul 8, 2025

Well I decided to add this when I was running

$ bundle exec ruby dspace-reporter.rb NAJCulture najculture.org

And it took me a while to figure out the script was inferring part of the rest_url, but that it was failing because i hadn't provided the "www." Seeing the url that's returning 404 helped me see the problem. IMO, it doesn't cost anything to have an error message provide extra info (even if you think the user should know that info already) and that often helps the lightbulb go on sooner.

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.

2 participants