---
title: "Discussion on \"How to handle ActiveRecord::RecordNotFound exception in Rails?\" | Hashnode"
description: "Discussion on \"How to handle ActiveRecord::RecordNotFound exception in Rails?\". TL; DR: The best strategy is the one based on your needs\n\n\nProblem\nThe ActiveRecord::RecordNotFound exception in Rails occurs when a specific record is not found in the database.\nRails usually render an error page.\n\nError\nLet's check the exception fr..."
url: "https://hashnode.com/posts/how-to-handle-active-record-record-not-found-exception-in-rails/646ad1eec91183fdfa4639fc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to handle ActiveRecord::RecordNotFound exception in Rails?](https://blog.alexandrecalaca.com/how-to-handle-active-record-record-not-found-exception-in-rails?utm_source=hashnode&utm_medium=feed)

TL; DR: The best strategy is the one based on your needs Problem The ActiveRecord::RecordNotFound exception in Rails occurs when a specific record is not found in the database. Rails usually render an error page. Error Let's check the exception fr...

May 22, 2023 · 3 min read · blog.alexandrecalaca.com  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Alexandre Calaça](https://hashnode.com/@alexandrecalaca)

@alexandrecalaca

  
[View profile](https://hashnode.com/@alexandrecalaca)

I'm a passionate software developer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
