Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements custom 404 and 500 pages for handling custom 404 and error pages #1958

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

jrgriffiniii
Copy link
Contributor

Resolves #1624

Rails.logger.error("Error changing curator for work: #{work.id}. Exception: #{ex.message}")
render json: { errors: ["Cannot save dataset"] }, status: :bad_request
Honeybadger.notify("Error changing curator for work: #{work.id}. Exception: #{ex.message}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@@ -314,10 +316,15 @@ def rescue_aasm_error
if action_name == "create"
handle_error_for_create(generic_error)
else
redirect_to root_url, notice: "We apologize, an error was encountered: #{generic_error.message}. Please contact the PDC Describe administrators."
redirect_to error_url, notice: "We apologize, an error was encountered: #{generic_error.message}. Please contact the PDC Describe administrators."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@bess bess merged commit 44de1c8 into main Oct 4, 2024
5 checks passed
@bess bess deleted the i1624-jrgriffiniii-custom-error-404 branch October 4, 2024 19:10
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.

Display our custom error pages instead of catching them all as a generic 404
2 participants